<template>
  <div class="my-commission">
    <!-- TODO 小程序文字滚动 -->
    <text-marquee v-if="isShowAlert" :marqueeText="cashPopData.draw_alert"></text-marquee>
    <header
      @click="toCommissionContent()"
      :style="{backgroundImage:`url(${my_commission_img || defaultBg})`}"
    >
      <div class="content-head" v-if="hide_next_level_price === 0">
        <div class="income-commission">
          <i class="fontGilroy">{{total_commission}}</i>
          <p>已收入{{commission_name}}(元)</p>
        </div>
        <!-- 通联分账这里不展示可提现佣金，在下面展示 ，汇付分账也不显示 -->
        <div class="remaine-commission" v-if="cashPopData.tlfz_is_opened!=1&& cashPopData.hide_withdraw_amount!=1">
          <p>可提现{{commission_name}}{{userInfo.remaining_commission}}元</p>
        </div>
      </div>
      <div>
        <ul class="data-list">
          <li v-if="hide_commission_dz">
            <i class="fontGilroy">{{wait_commission}}</i>
            <p>待收益(元)</p>
          </li>
          <li>
            <i class="fontGilroy">{{frozen_commission}}</i>
            <p>待审核(元)</p>
          </li>
          <li v-if="is_bonus_user">
            <i class="fontGilroy">{{bonus_money}}</i>
            <p>{{agent_bonus}}(元)</p>
          </li>
        </ul>
      </div>
    </header>
    <main>
      <div class="item-tx clearfix hfMargin" v-if="adapay_info && adapay_info.adapay_switch">
          <div class="info-tx">
            <p v-if="withdraw_commission_name_hf">{{withdraw_commission_name_hf}}</p>
            <p v-else>汇付可提现{{commission_name}}({{is_crossBorderDz? mSymbol.name:'元'}})</p>

            <div class="tl-type">

              <div class="tl-type-item">
                <span>可提现：</span>
                <i class="fontGilroy">{{adapay_info.user_account}}</i>
              </div>
              <div class="tl-type-item unable-withdraw">
                <span>不可提现：</span>
                <i class="fontGilroy">{{adapay_info.user_wait_account}}</i>
              </div>
            </div>
          </div>
        <div class="btn-item clearfix tlcommissionbtn">
          <div>
            <van-button class="btn light-blue-btn fr" v-if="adapay_info.adapay_balance" @click="showBalancePopApapay()">转到余额</van-button>
            <template v-if="adapay_info.adapay_withdraw_switch">
              <van-button class="btn light-blue-btn fr" @click="Jump('withdrawalsRecord')">提现记录</van-button>
              <van-button class="btn warning-btn fr" @click="hfAdapay()">我要提现</van-button>
              <van-button class="btn btn-warning fr" v-if="adapay_info.showCard" @click="hfAdapayCard()">更换银行卡</van-button>
              <van-button class="btn btn-warning fr" v-if="adapay_info.adapay_to_deposit_switch" @click="hfShowPop()">转到{{deposit_alias}}</van-button>
            </template>

          </div>
        </div>

      </div>
      <template v-if="is_show_old_commssion">
      <div class="item-tx clearfix" v-if="!is_hidden_money_dz || (is_hidden_money_dz && ((isOpenTl && (cashPopData.tlfz_balance.all_amount - 0 > 0 || cashPopData.company_tlfz_balance.all_amount - 0 > 0  || surplus_draw_money - 0 > 0 || userInfo.remaining_commission - 0 > 0)) || (!isOpenTl && (surplus_draw_money - 0 > 0 || userInfo.remaining_commission - 0 > 0))))">
        <div>
          <div class="info-tx tlcommission" v-if="isOpenTl && !is_hidden_money_dz || (is_hidden_money_dz && (cashPopData.tlfz_balance.all_amount - 0 > 0 || cashPopData.company_tlfz_balance.all_amount - 0 > 0))">
            <p>通联可提现{{commission_name}}(元)</p>
            <div class="tl-type">
              <div class="tl-type-item" v-if="!is_hidden_money_dz || (is_hidden_money_dz && cashPopData.tlfz_balance.all_amount - 0 > 0)">
                <span>个人：</span>
                <i class="fontGilroy" v-if="cashPopData.tlfz_balance">{{cashPopData.tlfz_balance.all_amount}}</i>
                <i class="fontGilroy" v-else>0.00</i>
              </div>
              <div class="tl-type-item" v-if="!is_hidden_money_dz || (is_hidden_money_dz && cashPopData.company_tlfz_balance.all_amount - 0 > 0)">
                <span>企业：</span>
                <i class="fontGilroy" v-if="cashPopData.company_tlfz_balance">{{cashPopData.company_tlfz_balance.all_amount}}</i>
                <i class="fontGilroy" v-else>0.00</i>
              </div>
            </div>
            <div class="btn-item clearfix">
              <div>
                <van-button class="btn light-blue-btn fr" @click="Jump('withdrawalsRecord')">提现记录</van-button>
                <van-button class="btn warning-btn fr" v-if="is_tl_commission_draw" @click="verificationTl">我要提现</van-button>
                <van-button class="btn light-blue-btn fr" v-if="tlfz_commission_to_deposit" @click="commissionTurnBalanceTl">转到通联余额</van-button>

              </div>
            </div>
          </div>
          <div class="info-tx" v-if="!is_hidden_money_dz || (is_hidden_money_dz && (surplus_draw_money - 0 > 0 || userInfo.remaining_commission - 0 > 0))">
             <p v-if="withdraw_commission_tips">{{withdraw_commission_tips}}</p>
            <p v-else>本月可提现{{commission_name}}(元)</p>
            <i class="fontGilroy">{{surplus_draw_money||userInfo.remaining_commission}}</i>
          </div>
        </div>
        <div class="btn-item clearfix tlcommissionbtn"  v-if="!is_hidden_money_dz || (is_hidden_money_dz && (surplus_draw_money - 0 > 0 || userInfo.remaining_commission - 0 > 0))">
          <div
            v-if="!commission_auto_balance||(commission_auto_balance && !commission_balance_draw_auto)"
          >
            <van-button v-if="user_send_commission_to_other_dz > 0" class="btn light-blue-btn fr" @click="showSendCommissionPopo()">转赠</van-button>
            <div>
              <van-button v-if="cashYeShow" class="btn light-blue-btn fr" @click="showBalancePopo()">转到余额</van-button>
            </div>
            <!-- <a :href="withdrawalsRecordUrl"> -->
            <van-button class="btn light-blue-btn fr" v-if="!(is_dls_withdraw_control_dz && !dls_withdraw_control)&&!is_weibei_dz" @click="Jump('withdrawalsRecord')">提现记录</van-button>
            <!-- </a> -->
            <!-- 喜美恩 不显示标准系统‘我要提现’按钮 -->
            <van-button v-if="(cashApplyShow||cashPopData.is_open_enterprise == 1)&&!ltsn_dz&&!(is_dls_withdraw_control_dz && !dls_withdraw_control)&&!is_weibei_dz" class="btn warning-btn fr" @click="verification">我要提现</van-button>
            <van-button v-if="is_weibei_dz" class="btn light-blue-btn fr" @click="transferWeibeiClick">转到现金</van-button>
            <div v-else>
              <van-button
                      v-if="is_dhs_allow_deposit==1 && is_commission_to_deposit==1 && is_check_dhs==1"
                      class="btn btn-warning fr"
                      @click="showPopo()"
              >转到{{deposit_alias}}</van-button>
              <!-- 定制 佣金转积分 start -->
              <template v-if="is_dls_withdraw_control_dz && withdraw_commission_to_point_switch">
                <van-button class="btn light-blue-btn fr" @click="jumpName('brokerageToPoint')">转积分记录</van-button>
                <van-button class="btn warning-btn fr" @click="clickZhuanPoint">转到积分</van-button>
              </template>
              <!-- 定制 佣金转积分 end -->
            </div>
          </div>
        </div>

      </div>
      </template>
      <div
          class="user-card"
          v-if="is_check_agent == 1 && SHOP_ID != '8006865' && hide_commission_dz"
          :key="'is_check_agent'"
        >
        <div class="user-card-title clearfix">
          <i class="icon fl"></i>
          <p class="fl">{{ftitle_agents}}收入{{commission_name}}</p>
        </div>
        <div class="user-card-list">
          <ul>
            <li v-if="hide_next_level_price === 0">
              <p>总计(元)</p>
              <i class="fontGilroy">{{fx_total_commission}}</i>
            </li>
            <li>
              <p>待收益(元)</p>
              <i class="fontGilroy">{{fx_wait_commission}}</i>
            </li>
            <li>
              <p>完成订单(笔)</p>
              <i class="fontGilroy">{{fx_success_num}}</i>
            </li>
            <li>
              <p>交易中订单(笔)</p>
              <i class="fontGilroy">{{fx_wait_num}}</i>
            </li>
          </ul>
        </div>
      </div>
      <div class="user-card" v-if="is_dls == 1 && hide_commission_dz" :key="'is_dls'">
        <div class="user-card-title clearfix">
          <i class="icon fl"></i>
          <p class="fl">{{ftitle_agencies}}收入{{commission_name}}</p>
        </div>
        <div class="user-card-list">
          <ul>
            <li v-if="hide_next_level_price === 0">
              <p>总计(元)</p>
              <i class="fontGilroy">{{dls_total_commission}}</i>
            </li>
            <li>
              <p>待收益(元)</p>
              <i class="fontGilroy">{{dls_wait_commission}}</i>
            </li>
            <li>
              <p>完成订单(笔)</p>
              <i class="fontGilroy">{{success_order_num}}</i>
            </li>
            <li>
              <p>交易中订单(笔)</p>
              <i class="fontGilroy">{{wait_order_num}}</i>
            </li>
          </ul>
        </div>
      </div>
      <div class="user-card" v-if="is_check_dhs == 1 && !ltsn_dz && hide_commission_dz" :key="'is_check_dhs'">
        <div class="user-card-title clearfix">
          <i class="icon fl"></i>
          <p class="fl">{{dhs_alias}}收入{{commission_name}}</p>
        </div>
        <div class="user-card-list">
          <ul>
            <li v-if="hide_next_level_price === 0">
              <p>总计(元)</p>
              <i class="fontGilroy">{{dhs_total_commission || '--'}}</i>
            </li>
            <li>
              <p>待收益(元)</p>
              <i class="fontGilroy">{{dhs_wait_commission || '--'}}</i>
            </li>
            <li>
              <p>完成订单(笔)</p>
              <i class="fontGilroy">{{dhs_success_order_num}}</i>
            </li>
            <li>
              <p>交易中订单(笔)</p>
              <i class="fontGilroy">{{dhs_wait_order_num}}</i>
            </li>
          </ul>
        </div>
      </div>
      <div class="user-card" v-if="is_tgy && hide_commission_dz" :key="'is_tgy'">
        <div class="user-card-title clearfix">
          <i class="icon fl"></i>
          <p class="fl">招商经理收入{{commission_name}}</p>
        </div>
        <div class="user-card-list">
          <ul>
            <li v-if="hide_next_level_price === 0">
              <p>总计(元)</p>
              <i class="fontGilroy">{{tgy_commission_survey.total_commission}}</i>
            </li>
            <li>
              <p>待收益(元)</p>
              <i class="fontGilroy">{{tgy_commission_survey.wait_commission}}</i>
            </li>
            <li>
              <p>完成订单(笔)</p>
              <i class="fontGilroy">{{tgy_commission_survey.success_commission_order_num}}</i>
            </li>
            <li>
              <p>交易中订单(笔)</p>
              <i class="fontGilroy">{{tgy_commission_survey.wait_commission_order_num}}</i>
            </li>
          </ul>
        </div>
      </div>
      <!-- x+1 链动中心 -->
      <div class="user-card" v-if="total_commission_chaining > 0 || wait_commission_chaining > 0" >
        <div class="user-card-title clearfix">
          <i class="icon fl"></i>
          <p class="fl">{{chaining_commission}}收入{{commission_name}}</p>
        </div>
        <div class="user-card-list">
          <ul>
            <li>
              <p>总计({{is_crossBorderDz? mSymbol.name:'元'}})</p>
              <i class="fontGilroy">{{total_commission_chaining}}</i>
            </li>
            <li>
              <p>待收益({{is_crossBorderDz? mSymbol.name:'元'}})</p>
              <i class="fontGilroy">{{wait_commission_chaining}}</i>
            </li>
            <li>
              <p>完成订单(笔)</p>
              <i class="fontGilroy">{{success_commission_order_num}}</i>
            </li>
            <li>
              <p>交易中订单(笔)</p>
              <i class="fontGilroy">{{wait_commission_order_num}}</i>
            </li>
          </ul>
        </div>
      </div>
      <!-- 视频号佣金 -->
      <div class="user-card" v-if="live_commission_survey.total_commission > 0 || live_commission_survey.wait_commission > 0">
        <div class="user-card-title clearfix">
          <i class="icon fl"></i>
          <p class="fl">视频号小店收入{{commission_name}}</p>
        </div>
        <div class="user-card-list">
          <ul>
            <li>
              <p>总计({{is_crossBorderDz? mSymbol.name:'元'}})</p>
              <i class="fontGilroy">{{live_commission_survey.total_commission}}</i>
            </li>
            <li>
              <p>待收益({{is_crossBorderDz? mSymbol.name:'元'}})</p>
              <i class="fontGilroy">{{live_commission_survey.wait_commission}}</i>
            </li>
            <li>
              <p>完成订单(笔)</p>
              <i class="fontGilroy">{{live_commission_survey.success_commission_order_num}}</i>
            </li>
            <li>
              <p>交易中订单(笔)</p>
              <i class="fontGilroy">{{live_commission_survey.wait_commission_order_num}}</i>
            </li>
          </ul>
        </div>
      </div>
      <!-- 三三复制佣金 -->
      <div class="user-card" v-if="(replicate_success_commission.total_commission && replicate_success_commission.total_commission > 0) || (replicate_success_commission.wait_commission && replicate_success_commission.wait_commission > 0)">
        <div class="user-card-title clearfix">
          <i class="icon fl"></i>
          <p class="fl">{{replicate_commission}}收入{{commission_name}}</p>
        </div>
        <div class="user-card-list">
          <ul>
            <li>
              <p>总计({{is_crossBorderDz? mSymbol.name:'元'}})</p>
              <i class="fontGilroy">{{replicate_success_commission.total_commission}}</i>
            </li>
            <li>
              <p>待收益({{is_crossBorderDz? mSymbol.name:'元'}})</p>
              <i class="fontGilroy">{{replicate_success_commission.wait_commission}}</i>
            </li>
            <li>
              <p>完成订单(笔)</p>
              <i class="fontGilroy">{{replicate_success_commission.success_commission_order_num}}</i>
            </li>
            <li>
              <p>交易中订单(笔)</p>
              <i class="fontGilroy">{{replicate_success_commission.wait_commission_order_num}}</i>
            </li>
          </ul>
        </div>
      </div>
      <div class="info-detail" v-if="detailList.length && !ltsn_dz">
        <div class="info-detail-title">
          <p @click="handleAllType">{{commissionText}}<span class="icon"></span></p>
        </div>
        <div class="info-detail-lists">
          <!-- <li v-for="(item, index) in detailList" :key="index">
              <p
                class="info-detail-list-text"
                v-if="item.commission_remark"
              >备注：{{item.commission_remark}}</p>
              <p class="income_expend" v-else>{{item.income_expend}}</p>
              <span>{{item.money}}</span>
              <p class="info-detail-list-time">{{item.trade_time}}</p>
          </li>-->
          <van-list
            class="info-detail-list"
            v-model="loading"
            :finished="finished"
            :error.sync="error"
            :immediate-check="immediateCheck"
            error-text="请求失败，点击重新加载"
            finished-text=""
            @load="onLoad"
            v-show="detailList.length"
          >
            <div class="info-detail-list-items" v-for="(item, index) in detailList" :key="index">
              <p
                class="info-detail-list-text"
                v-if="item.commission_remark"
              >备注：{{item.commission_remark}}
              <img src="https://img.wifenxiao.com/h5-wfx/images/user/liveLogo.png" class="liveLogo" v-if="item.is_video_order_source">
              </p>
              <p class="income_expend" v-else>{{item.income_expend}}
               <img src="https://img.wifenxiao.com/h5-wfx/images/user/liveLogo.png" class="liveLogo" v-if="item.is_video_order_source">
              </p>
              <p class="income-order" v-if="item.order_no">订单号：{{item.order_no}}</p>
              <p class="income-order" v-if="item.reference_id">被推荐人ID：{{item.reference_id}}</p>
              <p class="income-order" v-if="item.reference_nickname">被推荐人昵称：{{item.reference_nickname}}</p>
              <span>{{item.money}}</span>
              <p class="info-detail-list-time">{{item.trade_time}}</p>
            </div>
          </van-list>
        </div>
      </div>
      <!-- 转到商城余额 -->
      <van-dialog
        v-model="show"
        title="转到商城余额"
        show-cancel-button
        :closeOnPopstate="true"
        @confirm='enterBalancePop'
        class="common-confirm"
        @close="closePop"
      >
        <div class="pop-inputInfo">
          <input type="text" v-model="num" placeholder="输入金额" />
        </div>
      </van-dialog>
      <!-- 汇付转到预存款 -->
      <van-dialog
        v-model="showDepositHf"
        :title="'转到'+deposit_alias"
        show-cancel-button
        confirm-button-text="确定"
        :closeOnPopstate="true"
        @confirm='enterPopHf'
        class="common-confirm"
        @close="closePop"
      >
        <div class="pop-inputInfo">
          <input type="text" v-model="num" placeholder="输入金额" />
        </div>
      </van-dialog>
      <!-- 转到预存款 -->
      <van-dialog
        v-model="showDeposit"
        :title="'转到'+deposit_alias"
        show-cancel-button
        confirm-button-text="确定"
        :closeOnPopstate="true"
        @confirm='enterPop'
        class="common-confirm"
        @close="closePop"
      >
        <div class="pop-inputInfo">
          <input type="text" v-model="num" placeholder="输入金额" />
        </div>
      </van-dialog>
      <van-popup v-model="showCashPop" position="bottom" :style="{ height: '100%' }">
        <tx-pop @closePop="closeCashPop" :dzData="dzData" :cashPopData="cashPopData" :otherApply="other_apply"></tx-pop>
      </van-popup>
      <van-popup v-model="showCashPopTl" position="bottom" :style="{ height: '100%' }">
        <txTlPop @closePop="closeTlCashPop"
                 :dzData="dzData"
                 v-if="showCashPopTl"
                 :isTelCode="isTelCode"
                 :cashPopData="cashPopData" :otherApply="other_apply"></txTlPop>
      </van-popup>
      <!-- 汇付提现 -->
      <van-popup v-model="showCashPopHf" position="bottom" :style="{ height: '100%' }">
        <txHfPop @closePop="closeCashPop"
                @adapayStep="adapayStep"
                :cashPop="cashPopData"
                :cashPopData="adapay_info"></txHfPop>
      </van-popup>
    </main>
    <!-- 提现类型选择 -->
    <div class="withdrawalTypeBox_wrapper" v-show="withdrawalTypeShow">
      <div class="withdrawalTypeBox_block">
        <div class="block_img" @click="withdrawalTypeShow = false; isTl = false">
          <img src="https://img.wifenxiao.com/h5-wfx/images/user/icon_del.png" alt="">
        </div>
        <h6>提现类型</h6>
        <div class="block_selmain">
          <div class="block_selmain_item" v-if="cashApplyShow == 1" @click="clickWithdrawalType(1)" :class="txType == 1 ? 'sel': ''">
            <i class="icon personal"></i>
            <p class="withdrawal_txt">
              <span class="check"></span>
              <!-- 兼容通联分账 文案修改 总有客户 属于个人但是选择了企业 导致分账不成功 来源刘帅 -->
              <span>个人{{isTl? '对私': '提现'}}</span>
            </p>
          </div>
          <div class="block_selmain_item" @click="clickWithdrawalType(2)" :class="txType == 2 ? 'sel': ''">
            <i class="icon enterprise"></i>
            <p class="withdrawal_txt">
              <span class="check"></span>
              <!-- 兼容通联分账 文案修改 总有客户 属于个人但是选择了企业 导致分账不成功 来源刘帅-->
              <span>企业{{isTl? '对公': '提现'}}</span>
            </p>
          </div>
        </div>
        <div class="block_btn">
          <button class="block_btn_next" @click="clickNext(isOpenTl)">下一步</button>
        </div>
        <!-- <div v-if="isTl" class="isTl">注：个体户建议选择个人对私提现</div> -->
      </div>
    </div>
    <!-- 佣金明细类型 -->
    <van-popup
      v-model="showAllType"
      round
      closeable
      class="type-pop"
      position="bottom"
    >
    <div class="type-wrap">
      <div class="type-title">{{commission_name}}明细</div>
      <div class="type-content">
        <div class="item" v-for="item in income_expend" :key="item.id" @click="handleSelectType(item)">{{item.name}}</div>
      </div>
      <div class="type-close" @click="onCancel">关闭</div>
    </div>
    </van-popup>
    <!-- 佣金转积分弹窗 start -->
    <van-dialog
      v-model="showZhuanDialog"
      show-cancel-button
      confirm-button-text="确定"
      class="common-confirm"
      :before-close="zhuanPutongClick"
    >
      <div class="donation-box">
        <div class="con-box">
          <div class="input-box clearfix zhuan-box">
            <input type="number" name="point" placeholder="请输入转换金额" v-model="zhuanPointForm.point"/>
          </div>
          <p class="tips tips-zhuan">{{withdraw_commission_to_point_clerk}}</p>
        </div>
      </div>
    </van-dialog>
    <!-- 佣金转积分弹窗 end -->
    <!-- 通联佣金转通联余额弹窗 start -->
    <main>
      <van-dialog
          v-model="showCommissionTurnBalanceTl"
          title="转到通联余额"
          show-cancel-button
          confirm-button-text="确定"
          class="common-confirm"
          :before-close="commissionTurnBalanceTlClick"
      >
        <div class="pop-inputInfo">
          <input type="number" name="point" placeholder="请输入金额" v-model="commissionTurnBalanceMoneyTl"/>
        </div>
      </van-dialog>
    </main>
    <!-- 通联佣金转通联余额弹窗 end -->
    <!-- 余额转微呗弹窗 start -->
    <main>
    <van-dialog
      v-model="showBalanceTurnWeibei"
      title="转到现金"
      show-cancel-button
      confirm-button-text="确定"
      class="common-confirm"
      :before-close="showBalanceTurnWeibeiClick"
    >
      <div class="pop-inputInfo">
        <input type="number" name="point" placeholder="请输入金额" v-model="balanceTurnBalanceMoneyWeibei"/>
      </div>
    </van-dialog>
    </main>
    <!-- 余额转微呗弹窗 end -->
    <!-- 签署协议 复制链接 弹窗 start -->
    <van-popup v-model="showSignPop" class="sign-pop">
      <div class="sign-pop-con">
        <div class="pop-center">
          <span class="pop-point">提示</span>
          <span class="pop-num">点击按钮，复制链接至浏览器打开页面完成签署</span>
          <a class="sign-over red-gra-btn"
              href="javascript:;"
              @click="copySignUrl(tax_sign_url)">点此复制</a>
          <img class="sign-close"
                src="https://img.wifenxiao.com/h5-wfx/images/activity/helping_popup_close2.png"
                alt
                @click="clickCloseSignPop" />
        </div>
      </div>
    </van-popup>
    <!-- 签署 复制链接 弹窗 end -->
    <!-- 通联税筹 start -->
    <van-dialog
      v-model="showTongLian"
      show-cancel-button
      confirm-button-text="确定"
      class="common-confirm"
      @confirm="showTongLianClick"
    >
    <div class="donation-box">
        <div class="con-box">
          <div class="title">提示</div>
          <div class="input-box clearfix zhuan-box">
            <div class="tongMsg">用户状态码：{{tlRes}}</div>
            <div class="tongMsg">{{tongLianMsg.msg}}</div>
            <div class="tongTips">点击 “确定“ 完成相关操作</div>
          </div>
        </div>
      </div>
    </van-dialog>
    <van-popup v-model="showTongLianAuthentication" position="bottom" :style="{ height: '100%', background: '#f7f7f7' }">
      <tl-authentication @close="closePopAuthentication" :tlActive="tlActive" :tonglianPhone="tonglianPhone"></tl-authentication>
    </van-popup>
    <!-- 通联税筹 end -->
    <van-popup v-model="showHfAuthentication" position="bottom" :style="{ height: '100%', background: '#f7f7f7' }">
      <hf-authentication @close="closeHfAuthentication" :numClick="numClick" :hfChangeCard="hfChangeCard" :hfActive="hfActive" :hfType="hfType" />
    </van-popup>

    <!--转赠弹窗-->
    <van-popup
      class="donation-box-pop"
      v-model="showSendDialog"
      :close-on-click-overlay="false"
    >
      <div class="donation-box">
        <div class="title-box">佣金转赠</div>
        <div class="donation-con-box" v-if="!donationSuccess">
          <div class="con-box">
            <div class="input-box clearfix friend-uid-box">
              <label for="">会员ID：</label>
              <input type="number" placeholder="请输入会员ID或手机号" name="to_user_id" id="J-get-info" v-model="mobile" @input="changeFriendId"/>
              <div class="btn-verify" @click="clickVerifyFriend">验证</div>
              <span class="info" v-show="friendVerifyInfo.length>0">{{friendVerifyInfo}}</span>
            </div>
            <div class="input-box clearfix friend-info-box">
              <label for="">会员信息：</label>
              <div class="friend-info">
                <span class="avatar">
                  <img :src="avatar" alt="" v-show="avatar">
                </span>
                <span class="nickname">{{nickname || '微信昵称'}}</span>
              </div>
            </div>
            <div class="input-box clearfix amount-box" :class="is_crossBorderDz? 'crossClass':''">
              <label for="">转赠金额：</label>
              <input type="digit" placeholder="请输入转赠金额" name="point" v-model="sendForm.amount" @input="changeAmount"/>
              <div class="mark">{{is_crossBorderDz? mSymbol.name:'¥'}}</div>
              <span class="info" v-show="amountVerify.length>0">{{amountVerify}}</span>
            </div>
          </div>
          <div class="btn-box">
            <div class="btn cancel-btn" @click="closeSendDialog">取消</div>
            <div class="btn confirm-btn" @click="clickConfirmSend">确定</div>
          </div>
        </div>
        <div class="donation-success-box" v-else>
          <div class="con-box">
            <div class="img-box">
              <img src="https://img.wifenxiao.com/h5-wfx/images/success3.png" alt="">
            </div>
            <div class="txt">转赠成功</div>
          </div>
          <div class="btn-box">
            <div class="btn close-btn" @click="closeSucessDialog">关闭</div>
          </div>
        </div>
      </div>
    </van-popup>
  </div>
</template>

<script>
import Vue from 'vue'
import TxPop from '@/views/user/components/txPop/index'
import textMarquee from '@/components/textMarquee' // 文字滚动
import Storage from '@/utils/store.js'
import small from '@/smallapp/small'
import txTlPop from '@/views/user/components/txTlPop/index'
import txHfPop from '@/views/user/fxs/myCommission/components/txHfPop'

import { weiBeiTransferAccount } from '@/api/dz/weibei'
import tlAuthentication from '@/views/user/fxs/myCommission/components/tlAuthentication'
import hfAuthentication from '@/views/user/fxs/myCommission/components/hfAuthentication'

import {
  getMyCommission,
  tonglianTaxraiseSigning,
  getGzll,
  getQzInitiation,
  cashToBalance,
  commissionToDeposit,
  getMyCommissionDhsStatistics,
  setCommissionTurnBalance,
  tongLianGetMobile,
  getAgreementUrl,
  getContractUrl
} from '@/api/user/fxs/fxsApi'
import { getMQCloud, checkHasQualification, userSendCommissionToOther, getUserSignStatus } from '@/api/dz/dzApi'
import { getEnterpriseStatus, signContract, getUserBasicInfo } from '@/api/user/member/memberApi'
import { commissionChangePointDz } from '@/api/dz/dzBrokerageToPoint'
import { adapayCommissionTobalance, toDepositApply } from '@/api/hfAuth/index'
import { Popup, Dialog, Toast, Icon } from 'vant'
import 'vant/lib/index.css'
import { validLength } from '@/utils/validate'
Vue.use(Popup, Dialog, Toast, Icon)
export default Vue.extend({
  data() {
    return {
      sid:'',
      pid:'',
      bxls_cl: false,
      isShowAlert: true,
      showAllType: false, // 佣金类型弹窗
      commissionText: '',
      commissionSelectType: 0,
      commissionSelectName: '', // 佣金选中类型
      income_expend: {}, // 佣金类型
      isTelCode: 0,
      // withdrawalsRecordUrl: '', // 提现记录原来链接
      cashPopData: {
        is_balance: false, // 弹框判断是余额提现
        is_commission: true, // 弹框判断是佣金提现
        is_supplierWithdraw: false, // 弹框判断是供应商收入
        withdraw_type: [],
        draw_alert: '', // 温馨提示
        bankList: null, // 银行列表
        user_behavior_jd: null, // 银行
        user_behavior_wechat: null, // 微信
        user_behavior_alipay: null, // 支付宝
        commssion_to_balance_rate: '',
        withdraw_proportion: '',
        is_qz: null,
        is_draw_int: null, // 提现方式   整额   全额
        withdraw_percentage: '',
        max_tx_money: null,
        min_tx_money: null,
        withdraw_apply_agreement: null,
        need_withdraw_apply_agreement: null,
        remaining_commission: null,
        withdraw_start_amount: null,
        withdraw_multiple: null,
        must_pay_password: null,
        popup_show: null,
        code: null,
        identity: 'agents',
        jzb_is_opened: false,
        jzb_bank: {},
        ltsn_dz: false,
        is_id_card: null, // 是否开启需要填写身份证号码和姓名
        id_card_front_back: null, // 是否开启上传身份证正反面
        is_open_enterprise: null, // 是否开启企业提现
        popTitle: '佣金提现',
        withdraw_need_phone: null, // 是否填写手机号
        tlfz_is_opened: 0, // 是否开通通联
        member_info: {}, // 通联账号信息
        tlfz_balance: {
          all_amount: 0
        },
        company_tlfz_balance: {
          all_amount: 0
        },
        sign_contract_url: '', // 通联分账电子签约链接

        // 通联税筹
        is_tonglian_taxraise:0, //是否开启通联税筹
        is_signing:0,// 通联税筹：1需要签约（转到诚薪通小程序签约） 0不要签约
        withdraw_balance_point_proportion: 0,
        withdraw_point_proportion: 0,
        is_withdraw_point_dz: 0
      },
      dzData: {
        // 云账户
        is_mq_cloud: false,
        cloud_pay_now_type: [],
        cloud_type: null,
        cloud_default_1: null,
        cloud_default_2: null,
        cloud_default_3: null,
        // 漫威
        is_mw_dz: false,
        store_info_dz: '',
        shop_name: '',
        store_id: '',
        is_yj_dz: false // $_yj定制
      },
      is_fxs: '', // 判断分销商  分销商可以跳转到业绩统计
      commission_name: '',
      withdraw_commission_tips: '',
      withdraw_commission_name_hf: '',
      total_commission: '',
      wait_commission: '',
      frozen_commission: '',
      is_bonus_user: null,
      agent_bonus: '',
      bonus_money: '',
      surplus_draw_money: '',
      userInfo: {
        remaining_commission: ''
      },
      // code: null,
      commission_auto_balance: null,
      cashYeShow: null,
      is_qz: null,
      cashApplyShow: null,

      is_dhs_allow_deposit: null,
      is_commission_to_deposit: null,
      is_check_dhs: null,
      dhs_alias: null,
      dhs_total_commission: null,
      dhs_wait_commission: null,
      dhs_success_order_num: '--',
      dhs_wait_order_num: '--',
      // draw_alert: '温馨提示',
      is_dls: null,
      is_check_agent: null,
      ftitle_agents: null,
      fx_total_commission: null,
      fx_wait_commission: null,
      fx_success_num: null,
      fx_wait_num: null,
      SHOP_ID: null,
      is_tgy: null,
      tgy_commission_survey: {},
      detailList: [],
      chaining_commission: '',
      success_commission_order_num: 0,
      total_commission: 0,
      wait_commission: 0,
      wait_commission_order_num: 0,

      num: null,
      deposit_alias: '',
      ftitle_agencies: '',
      dls_total_commission: '',
      dls_wait_commission: '',
      success_order_num: '',
      wait_order_num: '',
      showCashPop: false, // 展示提现弹框
      canClick: false, // 可以展示提现弹框
      show: false, // 展示转到余额弹框
      canCashClick: false, // 可以展示转到余额弹框
      showDeposit: false, // 展示转到预存款弹框
      canCashDepositClick: false, // 可以展示转到预存款弹框
      in_time: null, // 设置提现时间
      show_time_tip: null, // 提现时间提示
      is_draw_int: null, // 提现方式   整额   全额
      // remaining_commission: null,
      withdraw_multiple: null,
      withdraw_start_amount: null,
      code: null,
      my_commission_img: null,
      defaultBg: 'https://img.wifenxiao.com/h5-wfx/images/user/commission_h_bg.png',
      p: 1,
      error: false,
      loading: true,
      finished: false,
      immediateCheck: false,
      not_limit_commission: '',
      other_apply: '',
      // 莱特妮丝定制
      ltsn_dz: false,
      isOK: true,
      isTl: false,
      // 企业提现
      withdrawalTypeShow: false, // 提现类型选择弹窗
      txType: 1, // 提现类型
      // 奇异国预存款定制
      yck_dz_can_tx: 1, // 0表示不能提现，1表示能提现
      yck_dz_tx_msg: '',
      is_common_tx: '', // 0：点击了正常的提现按钮 1:点击了通联分账的提现按钮
      // 佣金转积分
      is_dls_withdraw_control_dz: false,
      dls_withdraw_control: false,
      showZhuanDialog: false,
      withdraw_commission_to_point_switch: false,
      withdraw_commission_to_point_clerk: '',
      zhuanPointForm: {
        point: ''
      },
      isOpenTl: 0,
      showCashPopTl: false,
      showCommissionTurnBalanceTl: false,
      commissionTurnBalanceMoneyTl: '',
      tlfz_commission_to_deposit: 0,
      is_tl_commission_draw: 0, // 是否开启通联佣金 提现
      is_hidden_money_dz: 0,
      // 定制  转到微呗 satrt
      is_weibei_dz: false,
      showBalanceTurnWeibei: false,
      balanceTurnBalanceMoneyWeibei: '',
      // 定制  转到微呗 end
      tax_sign_url: '',
      showSignPop: false,
      showTongLian: false,
      showTongLianAuthentication: false,
      tonglianPhone: '',
      tongLianMsg: {
        msg: '',
        href: {}
      },
      live_commission_survey: {},
      titleDoc: '',
      tlRes: '',
      tlActive: 0,
      adapay_info: {
        showCard: false,
        adapay_to_deposit_switch: false // 是否显示预存款按钮
      }, // 汇付分账
      hfActive: 0, // 汇付分账步骤
      hfType: '1', // 汇付分账步骤类型
      showCashPopHf: false, // 汇付提现
      showDepositHf: false,
      canCashDepositClickHf: false, // 可以展示汇付转到预存款弹出框
      amount: '', // 汇付余额
      isShowHf: false,
      showHfAuthentication: false,
      numClick: 0,
      hfChangeCard: false, // 汇付更换银行卡
      is_show_old_commssion: 0, // 系统佣金是否显示
      hide_commission_dz: true, // 隐藏定制
      replicate_commission: '',
      replicate_success_commission: {},
      user_send_commission_to_other_dz: 0, // 转赠佣金定制
      showSendDialog: false,
      sendForm: {
        to_user_id: '',
        amount: ''
      },
      donationSuccess: false,
      isFriendVerify: 0,
      friendVerifyInfo: '',
      avatar: '',
      nickname: '',
      amountVerify: '',
      mobile: '',
      hide_next_level_price: 0 // 隐藏定制
    }
  },
  created() {
    // 与wxshow监听里的重复
    // this.init()

    this.sid=small.globalData.shopId
    this.pid=small.wxCache('global_login_info') ? small.wxCache('global_login_info').uid : '0'

    this.timeInit()
    this.is_dz()
    this.is_fxs = this.$route.query.type
    this.bxls_cl = this.$_shop('$_bxls_cl', this.sid)
    const ltsn_dz = this.$_shop('$_ltsn_dz', this.sid)
    this.ltsn_dz = ltsn_dz
  },
  methods: {
    getMyCommissionDhsStatistics() {
      this.temp_wait_commission = this.wait_commission
      this.wait_commission = '--'
      getMyCommissionDhsStatistics({}).then(res => {
        // console.log(res.data)
        const resData = res.data
        this.dhs_total_commission = (+resData.dhs_total_commission).toFixed(
                2
        )
        this.dhs_wait_commission = (+resData.dhs_wait_commission).toFixed(2)
        this.dhs_success_order_num = resData.dhs_success_order_num
        this.dhs_wait_order_num = resData.dhs_wait_order_num
        this.wait_commission = parseFloat(this.temp_wait_commission) + parseFloat(resData.dhs_wait_commission)
        this.wait_commission = (+this.wait_commission).toFixed(2)
      })
    },
    init() {
      this.$loadingWrap.show()
      setTimeout(() => {
        this.$loadingWrap.close()
      }, 50000)
      this.finished = false
      const data = { p: 1, income_expend: this.commissionSelectType }
      getMyCommission(data).then(res => {
        this.loading = false
        this.$loadingWrap.close()
        if (res.status == 1) {
          // 如果开启云账户 获取云账户数据（功能已下放，不做定制限制）
          if (res.data.data.is_moon_cloud) {
            this.dzData.is_mq_cloud = true
            this._getMQCloud()
          }
          this.yck_dz_can_tx = res.data.yck_dz_can_tx
          this.yck_dz_tx_msg = res.data.yck_dz_tx_msg
          // 是否开启 通联定制  余额 为0 隐藏 的插件
          this.is_hidden_money_dz = res.data.is_hidden_money_dz || 0
          // 接口数据结构需要小明优化
          const resData = res.data.data
            wx.setNavigationBarTitle({
              title: resData.ftitle_commission
            })
          this.titleDoc = resData.ftitle_commission
          // 见证宝
          this.cashPopData.jzb_is_opened = res.data.jzb_is_opened
          this.cashPopData.jzb_bank = res.data.jzb_bank

           // 通联分账
          // this.cashPopData.tlfz_is_opened = res.data.tlfz_is_opened
          this.isOpenTl = res.data.tlfz_is_opened
          this.cashPopData.hide_withdraw_amount = res.data.hide_withdraw_amount
          this.cashPopData.tlfz_balance = res.data.tlfz_balance || { all_amount: 0 }
          this.cashPopData.company_tlfz_balance = res.data.company_tlfz_balance || { all_amount: 0 }
          this.cashPopData.member_info = res.data.member_info
          this.sign_contract_url = res.data.sign_contract_url
          this.cashPopData.company_member_info = res.data.company_member_info || {}
          this.cashPopData.last_withdraw_info = res.data.data.last_withdraw_info
          // 通联提现是否需要审核
          this.isTelCode = res.data.is_tl_enterprise_audit || 0
          // 定制 转到微呗
          this.is_weibei_dz = res.data.is_weibei_dz || 0

          // 通联税筹 start
          this.cashPopData.is_tonglian_taxraise=resData.is_tonglian_taxraise
          // 通联税筹 end

          // 定制佣金转积分 start
          this.is_dls_withdraw_control_dz = res.data.is_dls_withdraw_control_dz
          this.dls_withdraw_control = res.data.dls_withdraw_control
          this.withdraw_commission_to_point_switch = res.data.withdraw_commission_to_point_switch
          this.withdraw_commission_to_point_clerk = res.data.withdraw_commission_to_point_clerk || ''
          // 定制佣金转积分 ent

          // 隐藏定制
          this.hide_commission_dz = !(res.data.hide_commission_dz > 0)
          // 佣金转增定制
          this.user_send_commission_to_other_dz = res.data.user_send_commission_to_other_dz
          // 隐藏定制
          this.hide_next_level_price = res.data.hide_next_level_price || 0

          this.other_apply = resData.other_apply
          this.withdrawalsRecordUrl = resData.withdrawals_recordz_url
          this.userInfo = resData.user_info
          this.code = resData.code
          this.in_time = resData.in_time // 时间控制
          this.show_time_tip = resData.specify_time
          this.commission_name = resData.commission_name
          this.withdraw_commission_tips = res.data.withdraw_commission_tips
          this.withdraw_commission_name_hf = res.data.withdraw_commission_name_hf
          if (this.commissionSelectName) {
            this.commissionText = this.commissionSelectName + '明细'
          } else {
            this.commissionText = '全部' + this.commission_name + '明细'
          }
          this.my_commission_img = resData.my_commission_img // 背景图片
          this.total_commission = (+resData.total_commission).toFixed(2)
          this.wait_commission = (+resData.wait_commission).toFixed(2)
          this.frozen_commission = (+resData.frozen_commission).toFixed(2)
          this.is_bonus_user = resData.is_bonus_user
          this.agent_bonus = resData.agent_bonus
          this.bonus_money = (+resData.bonus_money).toFixed(2)
          this.surplus_draw_money = resData.surplus_draw_money
          this.commission_auto_balance = resData.commission_auto_balance
          this.cashYeShow = resData.cashYeShow
          this.is_qz = this.cashPopData.is_qz = resData.is_qz
          this.cashApplyShow = resData.cashApplyShow
          this.is_dhs_allow_deposit = resData.is_dhs_allow_deposit
          this.is_commission_to_deposit = resData.is_commission_to_deposit
          this.is_check_dhs = resData.is_check_dhs
          this.withdraw_multiple = resData.withdraw_multiple || 0
          this.withdraw_start_amount = resData.withdraw_start_amount || 0
          this.not_limit_commission = resData.not_limit_commission
          this.deposit_alias = resData.deposit_alias
          this.commission_balance_draw_auto =
            resData.commission_balance_draw_auto
          this.is_dls = resData.is_dls
          // 汇付分账
          this.adapay_info = resData.adapay_info
          if (this.adapay_info) {
            if (this.adapay_info.step == 2 && this.adapay_info.adapay_member_type == 1) {
              this.adapay_info.showCard = true
            } else {
              this.adapay_info.showCard = false
            }
            // 汇付 预存款
            if (this.adapay_info.step == 2 && resData.adapay_info.adapay_to_deposit_switch == 1) {
              this.adapay_info.adapay_to_deposit_switch = true
            } else {
              this.adapay_info.adapay_to_deposit_switch = false
            }
          }
          this.is_show_old_commssion = res.data.is_show_old_commssion || 0
          // x+1 链动
          this.chaining_commission = resData.name_chaining_title || 'x+1'
          this.success_commission_order_num = resData.chaining_commission_survey && resData.chaining_commission_survey.success_commission_order_num ? resData.chaining_commission_survey.success_commission_order_num : 0
          this.total_commission_chaining = resData.chaining_commission_survey && resData.chaining_commission_survey.total_commission ? resData.chaining_commission_survey.total_commission : 0
          this.wait_commission_chaining = resData.chaining_commission_survey && resData.chaining_commission_survey.wait_commission ? resData.chaining_commission_survey.wait_commission : 0
          this.wait_commission_order_num = resData.chaining_commission_survey && resData.chaining_commission_survey.wait_commission_order_num ? resData.chaining_commission_survey.wait_commission_order_num : 0
          // 三三复制
          this.replicate_commission = resData.name_replicate_title || '复制'
          this.replicate_success_commission = resData.replicate_center_commission_survey || {}
          if (resData.is_dls != 0) {
            this.ftitle_agencies = resData.ftitle_agencies
            this.dls_total_commission = (+resData.dls_total_commission).toFixed(
              2
            )
            this.dls_wait_commission = (+resData.dls_wait_commission).toFixed(2)
            this.success_order_num = resData.success_order_num
            this.wait_order_num = resData.wait_order_num
          }
          if (resData.is_check_dhs != 0) {
            this.dhs_alias = resData.dhs_alias
            this.getMyCommissionDhsStatistics()
            // this.dhs_alias = resData.dhs_alias
            // this.dhs_total_commission = (+resData.dhs_total_commission).toFixed(
            //   2
            // )
            // this.dhs_wait_commission = (+resData.dhs_wait_commission).toFixed(2)
            // this.dhs_success_order_num = resData.dhs_success_order_num
            // this.dhs_wait_order_num = resData.dhs_wait_order_num
          }
          if (resData.is_check_agent != 0) {
            this.is_check_agent = resData.is_check_agent
            this.ftitle_agents = resData.ftitle_agents
            this.fx_total_commission = (+resData.fx_total_commission).toFixed(2)
            this.fx_wait_commission = (+resData.fx_wait_commission).toFixed(2)
            this.fx_success_num = resData.fx_success_num
            this.fx_wait_num = resData.fx_wait_num
          }
          if (resData.is_tgy) {
            this.is_tgy = resData.is_tgy
            this.tgy_commission_survey = resData.tgy_commission_survey
          }
          // 视频号
          this.live_commission_survey = resData.video_commission_survey
          // 提现弹框
          this.cashPopData.withdraw_agreement_name = resData.withdraw_agreement_name || '提现申请协议'
          this.cashPopData.withdraw_agreement_tips = resData.withdraw_agreement_tips || '请接受提现申请协议'

          this.cashPopData.is_withdraw_point_dz = res.data.is_withdraw_point_dz || 0
          this.cashPopData.is_commission = true
          this.cashPopData.withdraw_point_proportion = res.data.withdraw_point_proportion || 0
          // this.cashPopData.withdraw_balance_point_proportion = res.data.withdraw_balance_point_proportion || 0


          this.cashPopData.draw_alert = resData.draw_alert
          this.cashPopData.withdraw_type = resData.withdraw_type
          this.cashPopData.bankList = resData.bank_list
          this.cashPopData.user_behavior_jd = resData.user_behavior_jd
          this.cashPopData.user_behavior_wechat = resData.user_behavior_wechat
          this.cashPopData.user_behavior_alipay = resData.user_behavior_alipay
          this.cashPopData.is_id_card = resData.is_id_card // 是否开启需要填写身份证号码和姓名
          this.cashPopData.id_card_front_back = resData.id_card_front_back // 是否开启上传身份证正反面
          this.cashPopData.withdraw_need_phone = resData.withdraw_need_phone // 是否需要填写手机号
          this.cashPopData.commssion_to_balance_rate =
            resData.commssion_to_balance_rate
          this.cashPopData.withdraw_proportion = resData.withdraw_proportion
          this.cashPopData.is_draw_int = resData.is_draw_int
          this.cashPopData.withdraw_percentage = resData.withdraw_percentage
          this.cashPopData.max_tx_money = resData.max_tx_money || 0
          this.cashPopData.min_tx_money = resData.min_tx_money || 0
          this.cashPopData.is_qz = resData.is_qz
          this.cashPopData.withdraw_apply_agreement =
            resData.withdraw_apply_agreement
          this.cashPopData.need_withdraw_apply_agreement =
            resData.need_withdraw_apply_agreement
          this.cashPopData.remaining_commission = this.remaining_commission
          this.cashPopData.withdraw_multiple = this.withdraw_multiple
          this.cashPopData.withdraw_start_amount = this.withdraw_start_amount
          this.cashPopData.must_pay_password = resData.must_pay_password
          this.cashPopData.popup_show = resData.popup_show
          this.cashPopData.code = resData.code
          this.cashPopData.wx_account_name = resData.wx_account_name
          this.cashPopData.is_gzll = resData.is_gzll
          this.cashPopData.release_level = resData.release_level
          this.cashPopData.is_commssion_to_balance_withdraw =
            resData.is_commssion_to_balance_withdraw
          this.cashPopData.min_withdraw_proportion =
            resData.min_withdraw_proportion
          this.cashPopData.max_withdraw_proportion =
            resData.max_withdraw_proportion
          // this.detailList.push(...res.data.commission_log)
          // 佣金类型
          this.income_expend = resData.income_expend
          // 定制 漫威定制（门店提现） start
          if (resData.is_store_tx_dz == 1) {
            this.dzData.is_mw_dz = resData.is_store_tx_dz
            this.dzData.store_info_dz = resData.store_info_dz || ''
            // if(resData.store_info_dz.shop_name){
            this.dzData.shop_name = resData.store_info_dz.shop_name || ''
            this.dzData.store_id = resData.store_info_dz.store_id || ''
            // }
          }
          // 定制 漫威定制（门店提现） end
          // 是否开启企业提现
          this.cashPopData.is_open_enterprise = resData.is_open_enterprise
          if (res.data.commission_log && res.data.commission_log.length > 0) {
            this.detailList = res.data.commission_log
            this.p++
          }else{
            this.finished = true
          }
          // 是否开启 佣金转余额开关
          this.tlfz_commission_to_deposit = res.data.tlfz_commission_to_deposit || 0
          // 是否开启 通联佣金提现
          this.is_tl_commission_draw = res.data.is_tl_commission_draw || 0
        } else {
          this.$Error(res.data.msg)
        }
      })
    },
    onLoad() {
      const data = { income_expend: this.commissionSelectType }
      if (this.p == 1) {
        data.p = 2
      } else {
        data.p = this.p
      }
      getMyCommission(data).then(res => {
        this.loading = false
        if (res.status == 1) {
          const resData = res.data.commission_log
          if (resData && resData.length > 0) {
            this.detailList.push(...resData)
            this.p++
          } else {
            this.finished = true
          }
        } else {
          this.$Error(res.msg || '无更多数据')
        }
      }).catch(() => {
        this.error = true
      })
    },
    toCommissionContent() {
      // TODO 小程序二期增加跳转
      // return false
      if (this.is_fxs == 'fxs') this.$JumpPath(this, 'commissionContent')
    },
    // =======================================控制弹框 start
    timeInit() {
      const myDate = new Date()
      const totalSeconds = Math.round(myDate.getTime() / 1000)
      const time_status = Storage.fetchLocal('time_status')
      const time_status2 = Storage.fetchLocal('time_status2')
      const time_status3 = Storage.fetchLocal('time_status3')
      const time_status4 = Storage.fetchLocal('time_status4')
      const time_differ = Math.abs(totalSeconds - time_status)
      const time_differ2 = Math.abs(totalSeconds - time_status2)
      const time_differ3 = Math.abs(totalSeconds - time_status3)
      const time_differ4 = Math.abs(totalSeconds - time_status4)

      if (time_differ <= 10 && time_differ > 0) {
        setTimeout(function() {
          this.canClick = true
          Storage.saveLocal('time_status', 0)
        }, 10000)
      } else {
        this.canClick = true
      }
      if (time_differ2 <= 10 && time_differ2 > 0) {
        setTimeout(function() {
          this.canCashClick = true
          Storage.saveLocal('time_status2', 0)
        }, 10000)
      } else {
        this.canCashClick = true
      }

      if (time_differ3 <= 10 && time_differ3 > 0) {
        setTimeout(function() {
          this.canCashDepositClick = true
          Storage.saveLocal('time_status3', 0)
        }, 10000)
      } else {
        this.canCashDepositClick = true
      }
      if (time_differ4 <= 10 && time_differ4 > 0) {
        setTimeout(function() {
          this.canCashDepositClickHf = true
          Storage.saveLocal('time_status4', 0)
        }, 10000)
      } else {
        this.canCashDepositClickHf = true
      }
    },

    // 点击全部佣金类型
    handleAllType() {
      this.showAllType = true
    },

    // 关闭
    onCancel() {
      this.showAllType = false
    },
    // 通联佣金转通联余额
    commissionTurnBalanceTl() {
      // 实名认证或绑定手机号未成功
      if (this.cashPopData.member_info.tlfz_have_person_signed != 1) {
        this.jumpName('tlQualification')
        return false
      } else if (this.cashPopData.member_info.contract_status != 1) {
        // 通联电子签约未签约,跳去通联签约
        signContract({ member_type: 3 }).then(res => {
          if (res.status == 1) {
            const tlfzUrl = res.data.jump_url
              // 跳转通商云平台账户的小程序
              wx.navigateToMiniProgram({
                appId: 'wxc46c6d2eed27ca0a',//通商云平台账户小程序appId
                path: 'pages/merchantAddress/merchantAddress',
                extraData: {
                  targetUrl: tlfzUrl//商户拼接的请求报文
                },
                success(res) {
                  // 打开成功
                  // console.log(res)
                },
                fail(error) {
                  this.$Error('签约跳转失败')
                }
              })
          } else {
            this.$Error(res.msg)
          }
        })
        return false
      } else {
        this.showCommissionTurnBalanceTl = true
      }
    },
    commissionTurnBalanceTlClick(action, done) {
      if (action == 'confirm') {
        if (!this.commissionTurnBalanceMoneyTl) {
          this.$Error('金额不能为空')
          done(false)
          return false
        } else {
          this.$loadingWrap.show()
          const sendData = {
            amount: this.commissionTurnBalanceMoneyTl
          }
          setCommissionTurnBalance(sendData).then(res => {
            this.$loadingWrap.close()
            if (res.status == 1) {
              this.commissionTurnBalanceMoneyTl = ''
              this.$Error('操作成功')
              done()
              this.init()
            } else {
              this.$Error(res.msg)
            }
          })
        }
      } else {
        this.commissionTurnBalanceMoneyTl = ''
        done()
      }
    },

    handleSelectType(item) {
      this.commissionSelectType = item.id
      this.commissionSelectName = item.name
      this.commissionText = this.commissionSelectName + '明细'
      this.showAllType = false
      this.p = 1
      this.finished = false
      this.init()
    },

    // 关闭提示
    closeAlert() {
      this.isShowAlert = false
    },
    closeHfAuthentication(val) {
      this.showHfAuthentication = false
      document.title = this.titleDoc
      this.init()
    },
    // 汇付分账 -- 我要提现
    showBalancePopApapay() {
      this.numClick++
      if (this.adapay_info.adapay_company_apply_status == 0) {
        this.$Error(this.adapay_info.adapay_fail)
      } else if (this.adapay_info.adapay_company_apply_status == 2) {
        this.showHfAuthentication = true
        this.hfActive = 5
        this.hfType = 2
        document.title = '提现开户'
      } else {
        if (this.adapay_info.step == 0) {
          if (this.adapay_info.adapay_company_apply_status == 2) {
            this.$Error(this.adapay_info.adapay_fail)
          }
          this.showHfAuthentication = true
          this.hfActive = 0
          document.title = '提现开户'
        } else if (this.adapay_info.step == 1) {
          this.hfActive = 2
          this.hfType = 1
          this.showHfAuthentication = true
          document.title = '提现开户'
        } else {
          this.amount = null
          if (Number(this.adapay_info.user_account) > 0) {
            this.isShowHf = true
          } else {
            this.$Error('佣金为0元，不可转到余额')
          }
        }
      }
    },
    // 汇付转到余额确定
    enterBalancePopHf() {
      if (Number(this.amount) <= Number(this.adapay_info.user_account)) {
        this.$loadingWrap.show()
        adapayCommissionTobalance({
          amount: this.amount
        }).then(res => {
          this.$loadingWrap.close()
          if (res.status == 1) {
            this.$Error(res.data.msg)
            this.detailList = []
            // this.showHf = false
            this.init()
          } else {
            this.$Error(res.msg)
          }
        })
      } else {
        this.$Error(`转到余额金额不可超过可转金额（${this.adapay_info.user_account}元）`)
      }
    },
    adapayStep(data) {
      this.closeCashPop()
      this.hfAdapay()
    },
    // 更换银行卡
    hfAdapayCard() {
      this.numClick++
      this.hfActive = 2
      this.hfType = 1
      this.hfChangeCard = true
      this.showHfAuthentication = true
      document.title = '更换银行卡'
    },
    // 汇付分账 我要提现
    hfAdapay() {
      this.numClick++
      // this.adapay_info.showCard = false
      if (this.adapay_info.adapay_company_apply_status == 0) {
        this.$Error(this.adapay_info.adapay_fail)
      } else if (this.adapay_info.adapay_company_apply_status == 2) {
        this.showHfAuthentication = true
        this.hfActive = 5
        this.hfType = 2
        document.title = '提现开户'
      } else {
        if (this.adapay_info.step == 0) {
          if (this.adapay_info.adapay_company_apply_status == 2) {
            this.$Error(this.adapay_info.adapay_fail)
          }
          this.showHfAuthentication = true
          this.hfActive = 0
          document.title = '提现开户'
        } else if (this.adapay_info.step == 1) {
          this.hfActive = 2
          this.hfType = 1
          this.showHfAuthentication = true
          document.title = '提现开户'
        } else {
          if (Number(this.adapay_info.user_account) > 0) {
            this.showCashPopHf = true
          } else {
            this.$Error('佣金为0元，不可提现')
          }
        }
      }
    },
    // 汇付转到预存款
    hfShowPop() {
      this.timeInit()
      if (this.canCashDepositClickHf) {
        this.canCashDepositClickHf = false
        setTimeout(() => {
          this.canCashDepositClickHf = true
        }, 10000)
        this.num = null
        if (Number(this.adapay_info.user_account) > 0) {
          this.showDepositHf = true
        } else {
          this.$Error('佣金不足，不可提现')
        }
      } else {
        this.$Error('两次操作,请间隔10秒')
      }
    },
    // 汇付转到预存款弹框确定
    enterPopHf() {
      const callback = () => {
        const data = {
          money: this.num,
          code: this.cashPopData.code
        }
        toDepositApply(data).then(res => {
          this.$loadingWrap.close()
          if (res.status == 1) {
            this.$Error(res.msg)
            // 获取当前时间
            const myDate = new Date()
            const totalSeconds = Math.round(myDate.getTime() / 1000)
            Storage.saveLocal('time_status4', totalSeconds)
            this.p = 1
            this.detailList = []
            this.init()
          } else {
            this.$Error(res.msg)
          }
        })
        this.showDepositHf = false
      }

      this.verification2(callback)
    },
    // 展示转到余额弹框
    showBalancePopo() {
      this.timeInit()
      if (this.canCashClick) {
        this.canCashClick = false
        if (this.is_draw_int == 1) {
          if (
            this.remaining_commission < +this.withdraw_multiple &&
            this.not_limit_commission != 1
          ) {
            this.$Error(
              `您账户的佣金余额不足${this.withdraw_multiple}元，不能申请提现！`
            )
          } else {
            this.num = null
            this.show = true
          }
        } else {
          if (
            this.remaining_commission < +this.withdraw_start_amount &&
            this.not_limit_commission != 1
          ) {
            this.$Error(
              `您账户的佣金余额不足${this.withdraw_start_amount}元，不能申请提现！`
            )
          } else {
            this.num = null
            this.show = true
          }
        }
        setTimeout(() => {
          this.canCashClick = true
        }, 10000)
      } else {
        this.$Error('两次操作,请间隔10秒')
      }
    },
    // 转到余额弹框确定
    enterBalancePop() {
      const callback = () => {
        const data = {
          money: this.num,
          code: this.cashPopData.code
        }
        cashToBalance(data).then(res => {
          this.$loadingWrap.close()
          if (res.status == 1) {
            this.$Error(res.data.msg)
            // 获取当前时间
            const myDate = new Date()
            const totalSeconds = Math.round(myDate.getTime() / 1000)
            Storage.saveLocal('time_status2', totalSeconds)
            this.p = 1
            this.detailList = []
            this.init()
            this.finished = false
          } else {
            this.$Error(res.msg)
          }
        })
        this.show = false
      }
      this.verification2(callback)
    },
    // 展示转到预存款弹框
    showPopo() {
      this.timeInit()
      if (this.canCashDepositClick) {
        this.canCashDepositClick = false
        setTimeout(() => {
          this.canCashDepositClick = true
        }, 10000)
        this.num = null
        this.showDeposit = true
      } else {
        this.$Error('两次操作,请间隔10秒')
      }
    },
    // 转到预存款弹框确定
    enterPop() {
      const callback = () => {
        const data = {
          money: this.num,
          code: this.cashPopData.code
        }
        commissionToDeposit(data).then(res => {
          this.$loadingWrap.close()
          if (res.status == 1) {
            this.$Error(res.msg)
            // 获取当前时间
            const myDate = new Date()
            const totalSeconds = Math.round(myDate.getTime() / 1000)
            Storage.saveLocal('time_status3', totalSeconds)
            this.p = 1
            this.detailList = []
            this.init()
            this.finished = false
          } else {
            this.$Error(res.msg)
          }
        })
        this.showDeposit = false
      }

      this.verification2(callback)
    },
    // 小弹框(转到余额/转到预存款)取消
    closePop() {
      this.show = false
      this.showDeposit = false
      this.showDepositHf = false
    },
    // 验证(转到余额/转到预存款)
    verification2(callback) {
      if (this.num <= 0) {
        this.$Error('输入金额不能小于0！')
        return false
      }
      if (+this.num > this.userInfo.remaining_commission) {
        this.$Error('输入金额不能大于佣金金额！')
        return false
      }
      if (this.not_limit_commission != 1) {
        if (this.cashPopData.is_draw_int == 1) {
          if (
            isNaN(this.num) ||
            +this.num % this.cashPopData.withdraw_multiple != 0
          ) {
            this.$Error(
              `请输入${this.cashPopData.withdraw_multiple}的倍数的提现金额！`
            )
            return false
          }
        } else {
          if (
            isNaN(this.num) ||
            +this.num < this.cashPopData.withdraw_start_amount
          ) {
            this.$Error(
              `请输入大于${this.cashPopData.withdraw_start_amount}元的提现金额！`
            )
            return false
          }
        }
      }
      callback()
    },
    // 展示提现弹框
    showCash() {
      if (this.canClick) {
        this.canClick = false
        setTimeout(() => {
          this.canClick = true
        }, 10000)
        this.showCashPop = true
      } else {
        this.$Error('两次操作,请间隔10秒')
      }
    },
    // 关闭提现弹框
    closeCashPop() {
      this.showCashPop = false
      this.showCashPopTl = false
      this.showCashPopHf = false
    },
    closeTlCashPop(data) {
      this.showCashPop = false
      this.showCashPopTl = false
      this.withdrawalTypeShow = false
      if (data == 1) {
        this.init()
      }
    },
    // =======================================控制弹框 end

    verificationFn() {
      const data = { url: window.location.pathname }
      if (this.other_apply == 1) {
        this.$loadingWrap.show()
        setTimeout(() => {
          this.$loadingWrap.close()
        }, 50000)
        getGzll(data).then(res => {
          this.$loadingWrap.close()
          if (res.status == 1) {
            if (res.data.sign_url) {
              this.isOK = false
              Storage.saveLocal('webSrc',res.data.sign_url)
              this.$JumpName(this, 'webView', {title: ''})
              // window.location.href = res.data.sign_url
            } else {
              this.isOK = true
            }
          } else {
            this.isOK = false
            // this.$Error(res.msg)
            Dialog.confirm({
              message: res.msg,
              className: 'common-confirm',
              closeOnClickOverlay: true
            }).then(() => {
              // console.log(this)
              this.$JumpName(this, 'changeUserData')
              // on confirm
            }).catch(() => {
              this.isOK = true
              // on cancel
            })
          }
          if (!this.isOK) {
            return false
          }
          this.verificationOther()
        })
      } else if (this.other_apply == 2) {
        getQzInitiation(data).then(res => {
          this.$loadingWrap.close()
          if (res.status == 1) {
            if (res.data.sign_url) {
              this.isOK = false
              Storage.saveLocal('webSrc',res.data.sign_url)
              // small.wxCache('webSrc',res.data.sign_url)
              this.$JumpName(this, 'webView', {title: '.'})
            } else {
              this.isOK = true
            }
          } else {
            this.isOK = false
            Dialog.confirm({
              message: res.msg,
              className: 'common-confirm',
              closeOnClickOverlay: true
            }).then(() => {
              this.$JumpName(this, 'changeUserData')
              // on confirm
            }).catch(() => {
              this.isOK = true
              // on cancel
            })
          }
          if (!this.isOK) {
            return false
          }
          this.verificationOther()
        })
      } else {
        this.verificationOther()
      }
    },
    verificationOther() {
      // 设置提现时间判断
      if (this.in_time == 0) {
        this.$Error(this.show_time_tip)
        return false
      }
      // 余额
      let minWithdraw = 0
      if (this.is_draw_int == 1) {
        minWithdraw = this.withdraw_multiple
      } else {
        minWithdraw = this.withdraw_start_amount
      }
      // 通联分账提现
      if (this.cashPopData.tlfz_is_opened == 1) {
        if (this.cashPopData.tlfz_balance.all_amount - minWithdraw >= 0) {
          this.showCash()
        } else {
          this.$Error(`您账户的通联可提现${this.commission_name}不足${minWithdraw}元，不能申请提现！`)
        }
      } else if (this.remaining_commission < +minWithdraw) {
        this.$Error(`您账户的${this.commission_name}余额不足${minWithdraw}元，不能申请提现！`)
      } else {
        this.showCash()
      }
    },
    // 通联分账 我要提现
    verificationTl() {
      this.withdrawalTypeShow = true
      this.isTl = true
    },
    closePopAuthentication(val) {
      // console.log('111122221', val)

      if (val == 'success') {
        this.init()
      }
      if (this.$route.query.tlPop == 1 && this.$route.query.tlActive && this.$route.query.tlActive > 0) {
        this.$router.replace({ path: 'myCommission' })
      }
      this.showTongLianAuthentication = false
      wx.setNavigationBarTitle({
        title: this.titleDoc
      })
    },
    showTongLianClick() {
      this.$loadingWrap.show()
      wx.setNavigationBarTitle({
        title: '上传资料'
      })
      // 从第一步开始
      if (this.tlRes == 0 || this.tlRes == 20 || this.tlRes == 21) {
        tongLianGetMobile().then(res => {
          this.$loadingWrap.close()
          if (res.status == 1) {
            this.tonglianPhone = res.data
            this.showTongLian = false
            this.tlActive = 0
            this.showTongLianAuthentication = true
          } else {
            this.$Error(res.msg)
          }
        })
      } else if (this.tlRes == 22) { // 实名认证
        this.$loadingWrap.close()
        this.tlActive = 1
        this.showTongLianAuthentication = true
      } else if (this.tlRes == 23) { // 签署电子协议
        getAgreementUrl().then(res => {
          this.$loadingWrap.close()
          if (res.status == 1) {
              wx.navigateToMiniProgram({
                appId: 'wx66306c553d4d260b',
                path: 'pages/merchantAddress/merchantAddress',
                extraData: {
                  targetUrl: res.data.url
                },
                success(res) {
                  // 打开成功
                  // console.log(res)
                },
                fail(error) {
                  that.$Error('签约跳转失败')
                }
              })
          } else {
            this.$Error(res.msg)
          }
        })
      } else if (this.tlRes == 24) { // 绑定银行卡
        this.$loadingWrap.close()
        this.tlActive = 4
        this.showTongLianAuthentication = true
      } else if (this.tlRes == 26 || this.tlRes == 28) { // 签合同
        getContractUrl().then(data => {
          this.$loadingWrap.close()
          const version = data.data.version ? data.data.version : 'release'
          if (data.status == 1) {
            let path = `/pages/index/index?interactionType=${data.data.interactionType}&tonglianId=${data.data.tonglianId}&mId=${data.data.mId}`
            wx.navigateToMiniProgram({
              appId: 'wxe1ef808b3a9f6fae',
              path,
              envVersion: version,
              extraData: {
                interactionType: data.data.interactionType,
                tonglianId: data.data.tonglianId,
                mId: data.data.mId
              },
              success(res) {
                // 打开成功
                // console.log(res)
              },
              fail(error) {
                that.$Error('签约跳转失败')
              }
            })
          } else {
            this.$Error(data.msg)
          }
        })
      }
      // const resTaxraiseData = this.tongLianMsg.href
      // let path = `/pages/index/index?trans_id=${resTaxraiseData.trans_id}&tonglian_id=${resTaxraiseData.tonglian_id}&push_id=${resTaxraiseData.push_id}`
      // // 跳转通商云平台账户的小程序
      // // console.log('path:', path)
      // const accountInfo = wx.getAccountInfoSync();
      // const envVersion = accountInfo.miniProgram.envVersion;
      // wx.navigateToMiniProgram({
      //   appId: 'wxe1ef808b3a9f6fae',//诚薪通小程序appId
      //   path: path,
      //   envVersion: envVersion,
      //   extraData: {
      //     trans_id:resTaxraiseData.trans_id,
      //     tonglian_id:resTaxraiseData.tonglian_id,
      //     push_id:resTaxraiseData.push_id
      //   },
      //   success(res) {
      //     // 打开成功
      //     // console.log(res)
      //   },
      //   fail(error) {
      //     that.$Error('签约跳转失败')
      //   }
      // })
    },
    // 点击我要提现
    async verification() {
      if (this.yck_dz_can_tx == 0) {
        this.$Error(this.yck_dz_tx_msg)
        return false
      }
      // 是否开启通联税筹
      if (this.cashPopData.is_tonglian_taxraise == 1) {
        const that=this
        this.$loadingWrap.show()
        setTimeout(() => {
          this.$loadingWrap.close()
        }, 10000)
        const resTaxraise = await tonglianTaxraiseSigning()
        this.$loadingWrap.close()
        if(resTaxraise.status==1){
          const resTaxraiseData = resTaxraise.data
          that.tlRes = resTaxraiseData.res
          if (resTaxraiseData.res != 1) {
            that.tongLianMsg.msg = `${resTaxraiseData.msg}`
            // this.tongLianMsg.href = resTaxraiseData.scheme
            if (that.tlRes == 27) {
              that.showTongLian = false
              that.$Error(this.tongLianMsg.msg)
            } else {
              that.showTongLian = true
            }
            return
          } else {
            // 判断是否开启企业提现
            if (this.cashPopData.is_open_enterprise == 1) {
              if (this.cashApplyShow != 1) {
                this.txType = 2
              }
              this.withdrawalTypeShow = true
            } else {
              this.personalWithdrawal()
            }
          }
        }else{
          this.$Error(resTaxraise.msg)
          return false
        }
      }
      // 是否开启云账户
      if (this.dzData.is_mq_cloud) {
        this.$loadingWrap.show()
        setTimeout(() => {
          this.$loadingWrap.close()
        }, 10000)
        getUserSignStatus().then(res => {
          this.$loadingWrap.close()
          if (res.status == 1) {
            if (res.data.agency_status == 1) {
              this.$Error('云账户签约中，请稍后再试')
            } else if (res.data.agency_status == 0 || res.data.agency_status == 3) {
              this.$JumpName(this, 'cloundQualification')
            } else {
              // 判断是否开启企业提现
              if (this.cashPopData.is_open_enterprise == 1) {
                if (this.cashApplyShow != 1) {
                  this.txType = 2
                }
                this.withdrawalTypeShow = true
              } else {
                this.personalWithdrawal()
              }
            }
          } else {
            this.$Error(res.msg)
          }
        })
        return false
      }

      // 判断是否开启企业提现
      if (this.cashPopData.is_open_enterprise == 1) {
        if (this.cashApplyShow != 1) {
          this.txType = 2
        }
        this.withdrawalTypeShow = true
      } else {
        this.personalWithdrawal()
      }
    },
    // 提现类型选择
    clickWithdrawalType(type) {
      this.txType = type
    },
    // 下一步
    // 根据状态判断跳转链接
    jumpPath(url, data) {
      this.$JumpPath(this, url, data)
    },
    jumpName(name, data) {
      this.$JumpName(this, name, data)
    },
    // 通联分账提现修改
    checkTlfzRegister() {
      // console.log(this.txType, this.cashPopData.member_info.tlfz_have_person_signed, this.cashPopData.member_info.contract_status)
      if (this.txType == 1) { // 个人提现
        // 实名认证或绑定手机号未成功
        if (this.cashPopData.member_info.tlfz_have_person_signed != 1) {
          this.jumpName('tlQualification')
          return false
        } else if (this.cashPopData.member_info.contract_status != 1) {
          // 通联电子签约未签约,跳去通联签约
          signContract({ member_type: 3 }).then(res => {
            if (res.status == 1) {
              const tlfzUrl = res.data.jump_url
                // 跳转通商云平台账户的小程序
                wx.navigateToMiniProgram({
                  appId: 'wxc46c6d2eed27ca0a',//通商云平台账户小程序appId
                  path: 'pages/merchantAddress/merchantAddress',
                  extraData: {
                    targetUrl: tlfzUrl//商户拼接的请求报文
                  },
                  success(res) {
                    // 打开成功
                    // console.log(res)
                  },
                  fail(error) {
                    this.$Error('签约跳转失败')
                  }
                })
            } else {
              this.$Error(res.msg)
            }
          })
          return false
        } else {
          // this.cashPopData.tlObj = {}
          // this.cashPopData.tlObj.tlfz_is_opened = 1
          // // this.showCashPop = true
          // this.showCashPopTl = true
          this.setTlData(1)
        }
      } else { // 企业提现
        // this.setTlData(2)
        // return
        // this.jumpName('tlQualiConmpany')
        // openPage('tlQualiConmpany')
        // return
        const checkResult = this.cashPopData.company_member_info.check_result
        if (this.cashPopData.company_tlfz_need_register == 1) { // 企业提现
          this.jumpName('tlQualiConmpany')
          return false
        } else if (checkResult != 2) {
          // 认证结果：0认证中，1待审核，2成功，3失败
          if (checkResult == 0 || checkResult == 1) {
            this.$Error('审核中，请稍后重试')
            return false
          } else if (checkResult == 3) {
            this.$Error('审核失败，请重新签署')
            this.jumpName('tlQualiConmpany')
            return false
          }
        } else if (this.cashPopData.company_tlfz_need_bind_phone == 1) { // 绑定手机号
          this.jumpName('tlQualiBindPhone')
          return false
        } else if (this.cashPopData.company_member_info.ocr_idcard_comparison_result != 1 || this.cashPopData.company_member_info.ocr_regnum_comparison_result != 1) { // 影印件采集
          this.jumpName('tlQualiUpload', { idCard: this.cashPopData.company_member_info.ocr_idcard_comparison_result, comUp: this.cashPopData.company_member_info.ocr_regnum_comparison_result })
          return false
        } else if (this.cashPopData.company_member_info.contract_status != 1) {
          // 通联电子签约未签约,跳去通联签约
          signContract({ member_type: 2 }).then(res => {
            if (res.status == 1) {
              const tlfzUrl = res.data.jump_url
                // 跳转通商云平台账户的小程序
                wx.navigateToMiniProgram({
                  appId: 'wxc46c6d2eed27ca0a',//通商云平台账户小程序appId
                  path: 'pages/merchantAddress/merchantAddress',
                  extraData: {
                    targetUrl: tlfzUrl//商户拼接的请求报文
                  },
                  success(res) {
                    // 打开成功
                    // console.log(res)
                  },
                  fail(error) {
                    this.$Error('签约跳转失败')
                  }
                })
            } else {
              this.$Error(res.msg)
            }
          })
          return false
        } else {
          // this.showCashPop = true
          // this.cashPopData.tlObj = {}
          // this.cashPopData.tlObj.tlfz_is_opened = 1
          // this.showCashPopTl = true
          this.setTlData(2)
        }
      }
    },
    // 设置通联 数据
    setTlData(key) {
      // console.log(key, 'uuuu')
      this.showCashPopTl = false
      this.cashPopData.tlObj = {}
      this.cashPopData.tlObj.tlfz_is_opened = 1
      this.cashPopData.tlObj.member_info = this.cashPopData.member_info
      this.cashPopData.tlObj.company_member_info = this.cashPopData.company_member_info
      if (key == 1) {
        this.cashPopData.tlObj.txType = 1
        this.cashPopData.tlObj.isyj = 1
        this.cashPopData.tlObj.is_commission = true
        // console.log('哈哈哈哈')
        this.showCashPopTl = true
      } else if (key == 2) {
        this.cashPopData.tlObj.txType = 2
        this.cashPopData.tlObj.isyj = 2
        this.cashPopData.tlObj.is_commission = true
        this.showCashPopTl = true
      }

    },
    clickNext(tlIsOpened) {
      // console.log(tlIsOpened)
      if (tlIsOpened == 1) {
        this.checkTlfzRegister()
        return
      }
      if (this.txType == 1) {
        this.personalWithdrawal()
      } else if (this.txType == 2) {
        this.$loadingWrap.show()
        setTimeout(() => {
          this.$loadingWrap.close()
        }, 10000)
        getEnterpriseStatus().then(res => {
          if (res.status == 1) {
            if (res.data == 0) {
              this.jumpPath('certification', '')
            } else if (res.data == 1) {
              this.jumpPath('certification-reviewing', '')
            } else if (res.data == 2) {
              const data = {
                withdrawType: 'myCommission',
                code: this.cashPopData.code
              }
              this.jumpPath('certification-review-success', data)
            } else if (res.data == 3) {
              const data = {
                withdrawType: 'myCommission',
                code: this.cashPopData.code
              }
              this.jumpPath('enterpriseTx-applyCash', data)
            } else if (res.data == 4) {
              this.jumpPath('certification-review-fail', '')
            }
          } else {
            this.$Error(res.msg)
          }
        })
      }
    },
    // 个人提现
    personalWithdrawal() {
      this.timeInit()
      // 如果是云集定制，先判断是否提现认证
      if (this.dzData.is_yj_dz) {
        checkHasQualification().then(res => {
          this.$loadingWrap.close()
          if (res.status == 0) {
            this.$Error(res.msg)
            setTimeout(() => {
              window.location.href = res.url
            }, 1000)
            return false
          } else {
            this.verificationFn()
          }
        })
      } else {
        this.verificationFn()
      }
    },
    Jump(url, type) {
      const data = { type }
      this.$JumpPath(this, url, data)
    },
    // 定制   梦泉  start
    _getMQCloud() {
      getMQCloud().then(res => {
        this.$loadingWrap.close()
        if (res.status == 1) {
          this.dzData.cloud_pay_now_type = res.data.cloud_pay_now_type
          this.dzData.cloud_type = res.data.cloud_type
          this.dzData.cloud_default_1 = res.data.cloud_default_1
          this.dzData.cloud_default_2 = res.data.cloud_default_2
          this.dzData.cloud_default_3 = res.data.cloud_default_3
          this.dzData.cloud_agreement = res.data.cloud_agreement
          this.dzData.is_cloud_agreement = res.data.is_cloud_agreement
          this.dzData.agreement_name = res.data.agreement_name
        }
      })
    },
    // 定制   梦泉  end

    // 定制方法   判断店铺
    is_dz() {
      const shop = this.$route.query.sid
      const is_mw_dz = this.$_shop('$_mw_dz', shop)
      const is_yj_dz = this.$_shop('$_yj', shop)
      // 莱特妮丝定制
      const ltsn_dz = this.$_shop('$_ltsn_dz', shop)
      this.SHOP_ID = shop
      this.dzData.is_mw_dz = is_mw_dz
      this.dzData.is_yj_dz = is_yj_dz
      this.ltsn_dz = ltsn_dz
    },
    // 定制 佣金转积分 start
    clickZhuanPoint() {
      this.showZhuanDialog = true
    },
    zhuanPutongClick(action, done) {
      if (action == 'confirm') {
        if (!this.zhuanPointForm.point) {
          this.$Error('积分不能为空')
          done(false)
          return false
        }
        this.$loadingWrap.show()
        setTimeout(() => {
          this.$loadingWrap.close()
        }, 10000)
        commissionChangePointDz({ money: this.zhuanPointForm.point }).then(res => {
          this.$loadingWrap.close()
          if (res.data.status == 1) {
            done()
            this.$Error('转换成功')
            this.closeDialog()
            this.init()
          } else {
            done(false)
            this.$Error(res.data.msg)
          }
        })
      } else {
        this.zhuanPointForm.point = ''
        done()
      }
    },
    closeDialog() {
      this.zhuanPointForm.point = ''
      this.showZhuanDialog = false
    },
    // 定制 佣金转积分 ent
        // 定制 余额转到微呗start
    transferWeibeiClick() {
      this.showBalanceTurnWeibei = true
    },
    showBalanceTurnWeibeiClick(action, done) {
      if (action == 'confirm') {
        if (!this.balanceTurnBalanceMoneyWeibei) {
          this.$Error('金额不能为空')
          done(false)
          return false
        } else {
          this.$loadingWrap.show()
          const sendData = {
            money: this.balanceTurnBalanceMoneyWeibei,
            type: 2
          }
          weiBeiTransferAccount(sendData).then(res => {
            this.$loadingWrap.close()
            if (res.status == 1) {
              this.$Error('操作成功')
              this.balanceTurnBalanceMoneyWeibei = ''
              done()
              window.location.reload()
            } else {
              this.$Error(res.msg)
              done(false)
            }
          })
        }
      } else {
        this.balanceTurnBalanceMoneyWeibei = ''
        done()
      }
    },
    // 定制 余额转到微呗end
    // 签署 弹窗
    clickCloseSignPop() {
      this.showSignPop = false
    },
    copySignUrl(url) {
      var that = this
      wx.setClipboardData({
				data: url,
				success (res) {
					wx.getClipboardData({
						success(res) {
              that.clickCloseSignPop()
							wx.showToast({
								title: '复制成功',
								icon: 'none',
							});
						}
					})
				}
			})
    },
    // 转赠 定制 开始
    changeFriendId() {
      this.isFriendVerify = 0
      this.friendVerifyInfo = ''
      this.avatar = ''
      this.nickname = ''
    },
    // 点击验证会员ID
    clickVerifyFriend() {
      if (!validLength(this.sendForm.to_user_id)) {
        this.friendVerifyInfo = '请输入会员ID或手机号'
        return false
      }
      this.$loadingWrap.show()
      setTimeout(() => {
        this.$loadingWrap.close()
      }, 10000)
      getUserBasicInfo({ user_id: this.sendForm.to_user_id }).then(res => {
        this.$loadingWrap.close()
        if (res.status == 1) {
          this.isFriendVerify = 1
          this.avatar = res.data.avatar
          this.nickname = res.data.nickname || ''
          this.sendForm.to_user_id = res.data.user_id
        } else {
          // this.$Error(res.msg)
          this.isFriendVerify = 2
        }
      })
    },
    // 改变输入金额时
    changeAmount(key) {
      if (key) {
        this.sendForm.amount = this.onlyNumber(this.sendForm.amount)
      }
      this.amountVerify = ''
    },
    onlyNumber(value) {
      // 先把非数字的都替换掉，除了数字和.
      value = value.replace(/[^\d\.]/g, '')
      // 必须保证第一个为数字而不是.
      value = value.replace(/^\./g, '0.')
      // 保证只有出现一个.而没有多个.
      value = value.replace(/\.{2,}/g, '.')
      // 保证.只出现一次，而不能出现两次以上
      value = value.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.')
      // 只能输入两个小数
      value = value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')
      return value
    },
    // 关闭转赠余额弹窗执行
    closeSendDialog() {
      this.showSendDialog = false
      setTimeout(() => {
        this.sendForm.to_user_id = ''
        this.friendVerifyInfo = ''
        this.sendForm.amount = ''
        this.amountVerify = ''
        this.avatar = ''
        this.nickname = ''
        this.donationSuccess = false
        this.mobile = ''
      }, 500)
    },
    // 点击确定转赠
    clickConfirmSend() {
      if (!validLength(this.sendForm.to_user_id)) {
        this.friendVerifyInfo = '请输入会员ID或手机号'
        return false
      }
      if (this.isFriendVerify == 0) {
        this.friendVerifyInfo = '请先验证会员ID'
        return false
      } else if (this.isFriendVerify == 2) {
        return false
      }
      if (!validLength(this.sendForm.amount) || this.sendForm.amount <= 0) {
        this.amountVerify = '请输入正确的转赠金额'
        return false
      }

      this.$loadingWrap.show()
      setTimeout(() => {
        this.$loadingWrap.close()
      }, 10000)
      userSendCommissionToOther(this.sendForm).then(res => {
        this.$loadingWrap.close()
        if (res.status == 1) {
          this.donationSuccess = true
          this.init()
          this.mobile = ''
        } else {
          this.$Error(res.msg)
        }
      })
    },
    showSendCommissionPopo() {
      this.showSendDialog = true
    },
    closeSucessDialog() {
      this.showSendDialog = false
      setTimeout(() => {
        this.sendForm.to_user_id = ''
        this.friendVerifyInfo = ''
        this.sendForm.amount = ''
        this.amountVerify = ''
        this.avatar = ''
        this.nickname = ''
        this.donationSuccess = false
      }, 500)
    }
    // 转赠 定制 结束
  },
  mounted() {
      // 小程序触底加载更多
      window.addEventListener('reachbottom', () => {
        if(!this.finished){
          this.onLoad()
        }
      })
      // TODO 订阅刷新页面
      window.$$subscribe('txRefreshPage', data => {
        // console.log(data,'refresh')
        this.showCashPop = false
        this.init()
      })

      window.addEventListener('wxshow', () => {
        // this.showCashPop = false
        this.init()
        // 兼容通联税筹 目前仅兼容 跳转绑定银行卡 4，签署协议 3，如有其他需求 再进行兼容
        if (this.$route.query.tlPop == 1 && this.$route.query.tlActive && this.$route.query.tlActive > 0) {
          this.$loadingWrap.show()
          tonglianTaxraiseSigning().then(params => {
            this.$loadingWrap.close()
            if (params.data.res == 24 && this.$route.query.tlActive && this.$route.query.tlActive == 4) {
              this.tlActive = this.$route.query.tlActive
              this.showTongLianAuthentication = true
            } else if ((params.data.res == 26 || params.data.res == 28) && this.$route.query.tlActive && this.$route.query.tlActive == 3) { // 签合同
              // this.$Error('即将跳转签署合同')
              Toast.setDefaultOptions({ duration: 0 })
              Toast.loading({
                message: '即将跳转签署合同',
                forbidClick: true
              })
              getContractUrl().then(data => {
                Toast.clear()
                this.$loadingWrap.close()
                const version = data.data.version ? data.data.version : 'release'
                if (data.status == 1) {
                  let path = `/pages/index/index?interactionType=${data.data.interactionType}&tonglianId=${data.data.tonglianId}&mId=${data.data.mId}`
                  wx.navigateToMiniProgram({
                    appId: 'wxe1ef808b3a9f6fae',
                    path,
                    envVersion: version,
                    extraData: {
                      interactionType: data.data.interactionType,
                      tonglianId: data.data.tonglianId,
                      mId: data.data.mId
                    },
                    success(res) {
                      // 打开成功
                      // console.log(res)
                    },
                    fail(error) {
                      that.$Error('签约跳转失败')
                    }
                  })
                } else {
                  this.$Error(data.msg)
                }
              })
            }
          })
        }
      })
  },
  beforeDestroy() {
      window.$$unsubscribe('txRefreshPage') // 取消关于此消息的所有订阅

  },
  computed: {
    remaining_commission() {
      return parseFloat(this.userInfo.remaining_commission) || 0.0
    }
  },
  watch: {
    bank(newVal) {
      const item = this.bankList.find(bank => {
        return bank.value === newVal
      })
      this.bankName = item.name
    },
    mobile(newVal) {
      this.sendForm.to_user_id = newVal
    }
  },
  components: {
    TxPop,
    textMarquee,
    txTlPop,
    txHfPop,
    hfAuthentication,
    tlAuthentication
  }
})
</script>

<style lang="scss">
@import '../../../../styles/variables';
.my-commission {
  .tool-info {
    width: 750px;
    line-height: 80px;
    box-sizing: border-box;
    padding: 0 30px;
    position: relative;
    display: flex;
    font-size: 26px;
    color: #f38847;
    background: rgba(255, 242, 216, 1);
    p {
      white-space: nowrap;
    }
    span {
      display: block;
      margin-left: 20px;
    }
  }
  header {
    width: 100%;
    height: 400px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: $default;
    .content-head {
      text-align: center;
      .income-commission {
        i {
          display: block;
          font-size: 50px;
          font-weight: bold;
        }
        p{
          font-size: 26px;
          margin: 20px auto;
        }
      }
      .remaine-commission {
        // width: 330px;
        height: 60px;
        line-height: 60px;
        text-align: center;
        border-radius: 30px;
        background: rgba(0,0,0,0.1);
        padding: 0 30px;
        position: relative;
        &::before {
          position: absolute;
          top: -24px;
          left: 50%;
          content: '';
          transform: translateX(-50%);
          border: 12px solid transparent;
          border-bottom-color:rgba(0,0,0,0.1);
          // opacity: .1;
        }
      }
    }
    .data-list {
      width: 600px;
      margin-top: 30px;
      display: flex;
      justify-content: space-around;
      align-items: center;
      text-align: center;
      p {
        font-size: 26px;
      }
      i {
        font-size: 32px;
        font-weight: bold;
        margin-bottom: 25px;
      }
    }
  }
  main {
    padding: 20px 25px;
    .item-tx {
      width: 100%;
      background-color: $default;
      padding: 30px 5px 30px 25px;
      border-radius: 20px;
      .info-tx {
        .tl-type {
          display: flex;
          flex-direction: row;
          flex-wrap: nowrap;
          justify-content: space-between;
          padding-bottom: 10px;
          &-item {
            span {
              font-size: 16px;
            }
          }
        }
        p {
          font-size: 26px;
          color: #666;
          margin-bottom: 25px;
        }
        i {
          font-size: 32px;
          color: $warning;
          font-weight: bold;
        }
      }
      .btn-item {
        padding-top: 10px;
        .btn {
          padding: 0 18px;
          height: 56px;
          // line-height: 56px;
          border: none;
          border-radius: 30px;
          color: #fff;
          float: right;
          margin-right: 20px;
          font-size: 24px;
          margin-top: 10px;
          &.warning-btn{
            background: #f42b2b;
          }
          &.light-blue-btn {
            background: transparent;
            border:2px solid #E90104;
            color: #E90104;
          }
        }
      }

    }
    .user-card {
      background-color: $default;
      margin-top: 20px;
      border-radius: 20px;
      &-title {
        border-bottom: 1px solid #EDEDED;
        padding:30px;
        font-weight: bold;
        // i {
        //   display: block;
        //   width: 30px;
        //   height: 30px;
        // }
        p {
          font-size: 28px;
        }
      }
      &-list {
        padding-bottom: 40px;
        ul {
          display: flex;
          justify-content: flex-start;
          align-items: center;
          flex-flow: wrap;
          li {
            margin: 40px 0 10px 60px;
            width: 40%;
            p {
              font-size: 24px;
              color: #666666;
              margin-bottom: 25px;
            }
            i {
              font-size: 32px;
              color: #F30C23;
              font-weight: bold;
            }
          }
        }
      }
    }
    .info-detail {
       background-color: $default;
      margin-top: 20px;
      border-radius: 20px;
      &-title {
        border-bottom: 1px solid #EDEDED;
        padding:30px;
        font-weight: bold;
        p {
          font-size: 28px;
          .icon{
            box-sizing: content-box;
            margin-left:10px;
            display:inline-block;
            width:0;
            height:0;
            vertical-align: -2px;
            border:8px solid;
            border-color:#999 transparent transparent;
          }
        }
      }
      &-lists {
        // padding-bottom: 30px;
        .info-detail-list {
          // height: 520px;
          // overflow: auto;
          padding: 0 30px;
          .info-detail-list-items {
            position: relative;
            padding: 30px 0;
            font-size: 28px;
            background: #fff;
            border-bottom: solid 1px #EDEDED;
            .info-detail-list-text {
              color: #999999;
              font-size: 24px;
            }
            .income-order{
              color: #999;
              margin-top: 10px;
              font-size: 24px;
            }
            span {
              position: absolute;
              right: 16px;
              top: 60px;
              color: $warning;
              font-size: 32px;
              font-weight: bold;
            }
            .info-detail-list-time {
              color: #b0b0b0;
              font-size: 24px;
              margin-top: 15px;
            }
          }
        }
      }
    }
    .van-popup--center.van-popup--round {
      border-radius: 20px;
    }
    .pop-inputInfo {
      width:426px;
      margin: 40px auto;
      input {
        width: 100%;
        height:86px;
        background:rgba(255,255,255,1);
        border:2px solid rgba(237, 237, 237, 1);
        border-radius:6px;
        padding-left: 30px;
        font-size: 24px;
      }
    }
    .pop {
      width: 675px;
      border-radius: 20px;
      &-title {
        border-bottom: 1px solid #ccc;
        margin-bottom: 20px;
        font-size: 32px;
        padding: 20px 40px;
        color: #000;
        display: flex;
        justify-content: space-between;
        align-items: center;
        i {
          display: block;
          width: 40px;
          height: 40px;
          background: url('https://img.wifenxiao.com/h5-wfx/images/user/icon_del.png') center
            no-repeat;
          background-size: 100% 100%;
        }
      }

      button {
        // padding: 20px 20px;
        display: block;
        width: 600px;
        height: 80px;
        line-height: 80px;
        text-align: center;
        background-color: #ff8f09;
        color: #fff;
        border-radius: 80px;
        outline: none;
        border: none;
        // margin: 0px auto;
        margin: 30px auto;
        font-size: 28px;
        text-align: center;
        // box-sizing: border-box
      }
    }
  }
  // 提现类型弹层
  .withdrawalTypeBox_wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    .withdrawalTypeBox_block {
      position: relative;
      min-width: 600px;
      padding: 54px 70px;
      border-radius: 20px;
      background-color: #fff;
      .block_img{
        position: absolute;
        top: 30px;
        right: 30px;
        width: 28px;
        height: 28px;
        >img{
          max-width: 100%;
          width: 100%;
        }
      }
      h6{
        font-weight:bold;
        font-size:32px;
        color:#333;
        width: 100%;
        text-align: center;
        margin-bottom: 58px;
      }
      .block_selmain{
        display: flex;
        justify-content: space-around;
        margin-bottom: 60px;
        &_item{
          width:186px;
          height:186px;
          background-color:#F5F5F5;
          border: 1px solid #f5f5f5;
          border-radius:10px;
          margin-right: 54px;
          &:last-child{
            margin-right: 0;
          }
          i.icon{
            display: block;
            width: 65px;
            height: 65px;
            margin: 38px auto 18px;
            background-repeat: no-repeat;
            background-position: center;
            background-size: cover;
            &.personal{
              background-image: url("https://img.wifenxiao.com/h5-wfx/images/user/typeIcon.png");
            }
            &.enterprise{
              background-image: url("https://img.wifenxiao.com/h5-wfx/images/user/typeIcon1.png");
            }
          }
          .withdrawal_txt{
            display: flex;
            justify-content: center;
            align-items: center;
            >span{
              display: inline-block;
              font-size: 26px;
              color: #666;
              height: 26px;
            }
            .check{
              position: relative;
              width: 26px;
              height: 26px;
              margin-right: 10px;
              border: 1px solid #b3b3b3;
              border-radius: 50%;
            }
          }
          &.sel{
            border-color: #F10A1D;
            background-color:#FFF7F7;
            i.icon{
              &.personal{
                background-image: url("https://img.wifenxiao.com/h5-wfx/images/user/typeIcon_sel.png");
              }
              &.enterprise{
                background-image: url("https://img.wifenxiao.com/h5-wfx/images/user/typeIcon1_sel.png");
              }
            }
            .withdrawal_txt{
              >span{
                color: #EF0919;
              }
              .check{
                border-color: transparent;
                &::after{
                  content: '';
                  position: absolute;
                  right: 0;
                  bottom: 0;
                  display: block;
                  width: 26px;
                  height: 26px;
                  background: url("https://img.wifenxiao.com/h5-wfx/images/user/icon_check.png") no-repeat center/contain;
                }
              }
            }
          }
        }
      }
      .block_btn_next{
        font-size: 28px;
        color: #fff;
        width: 100%;
        height: 86px;
        line-height: 86px;
        text-align: center;
        background: linear-gradient(to right,#FE1B49, #E90104);
        border-radius: 42px;
      }
    }
  }
  .type-pop{
    padding: 0 20px 100px;
    .type-wrap{
      .type-title{
        font-size: 32px;
        text-align: center;
        // font-weight: bold;
        line-height: 110px;
        color: #333333;
        border-bottom: 1px solid #F0F0F0;
      }
      .type-content{
        overflow: auto;
        height:400px;
        margin: 40px 0;
        text-align: center;
        font-size: 32px;
        .item{
          padding:24px 0;
        }
      }
      .type-close{
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 700px;
        line-height: 76px;
        background: linear-gradient(270deg, #E90104 0%, #FE1B49 100%, #FE1B49 100%);
        opacity: 1;
        border-radius: 38px;
        text-align: center;
        font-size: 28px;
        color: #fff;
      }
    }
  }
  //签署 弹窗
  .sign-pop {
    width: 600px;
    padding-bottom: 102px;
    background: transparent;
    .sign-pop-con {
      position: relative;
      height: 396px;
      background: #fff;
      border-radius: 20px;
      .pop-center {
        position: absolute;
        height: 100%;
        width: 100%;
        box-sizing: border-box;
        padding: 30px;
        .title {
          width: 430px;
          height: 149px;
          margin: 38px auto 0;
          background: url("https://img.wifenxiao.com/h5-wfx/images/activity/popon_title.png")
            center/cover no-repeat;
          font-size: 36px;
          text-align: center;
          font-weight: bold;
          color: #fff;
          padding-top: 18px;
          box-sizing: border-box;
        }
        img {
          display: block;
          width: 200px;
          margin: 0 auto;
          height: 200px;
        }
        span {
          display: block;
          font-size: 32px;
          line-height: 46px;
          color: #333333;
          text-align: center;
          margin: 0 70px;
          margin-top: 20px;
          &.pop-point {
            font-size: 32px;
            font-weight: bold;
            i {
              color: #ffae00;
            }
          }
          &.pop-num {
            font-size: 28px;
            i {
              color: #f30c22;
            }
          }
        }
        .sign-over {
          display: block;
          width: 436px;
          line-height: 92px;
          border-radius: 46px;
          margin: 60px auto;
          text-align: center;
          color: #fff;
          font-size: 32px;
        }
        .sign-close {
          position: absolute;
          left: 0;
          right: 0;
          margin: 0 auto;
          width: 60px;
          height: auto;
          bottom: -100px;
        }
      }
    }
  }
}
// 喜美恩 通联分账
.info-bottom{
  position: relative;
  top: -15px
}
.tlcommission{
  margin-bottom: 20px;
  border-bottom: 1px solid #EDEDED;
  padding-bottom: 20px;
}
.tlcommissionbtn{
  border-bottom: 1px solid #EDEDED;
  padding-bottom: 20px;
}
.donation-box{
  .title {
    font-size: 35px;
    color: #333;
    font-weight: 600;
    text-align: center;
    margin-bottom: 40px;
  }
  .con-box{
    position:relative;
    padding:40px 60px;
  }
  .input-box{
    margin:16px 0;
    font-size:28px;
    label{
      float:left;
      display:block;
      width:150px;
      line-height:76px;
      text-align:right;
      font-weight:normal;
      color: #666666;
    }
    input{
      float:left;
      -webkit-appearance: none;
      width:256px;
      height:76px;
      padding:16px 10px;
      border:2px solid #EDEDED;
      border-radius:6px;
    }
  }
}
.zhuan-box{
  input{
    width:100% !important;
  }
}
.integral {
	display: inline-block;
	height: 56px;
	margin-left:6px;
	padding: 0 30px;
	font-size: 26px;
	color: #333;
	border-color:#999;
	background: #fff;
	color: #F20B22;
}
.tips{
  ont-weight: normal;
  color: #666666;
  font-size: 24px;
  text-indent: 70px;
}
.tips-zhuan{
  text-indent: 0 !important;
  margin-top: 50px;
}
.brokerage{
  margin-top:16px;
  font-size:24px;
  color:#999;
}
.tongMsg {
  text-align: center;
  margin-top: 16px;
  font-size: 26px;
}
.tongTips {
  text-align: center;
  margin: 20px 0;
  font-size: 26px;

}
.isTl {
  text-align: center;
  margin-top: 20px;
  color: #F30C23;
  font-size: 24px
}
.donation-box-pop{
  border-radius:20px;
}
.donation-box{
  width: 600px;
  .title {
    font-size: 35px;
    color: #333;
    font-weight: 600;
    text-align: center;
    margin-bottom: 40px;
  }
  .title-box{
    padding-top: 48px;
    font-size:32px;
    font-weight: normal;
    line-height: 48px;
    text-align: center;
  }
  .con-box{
    position:relative;
    padding:40px 60px;
  }
  .input-box{
    margin:30px 0;
    font-size:28px;
    label{
      float:left;
      display:block;
      width:150px;
      line-height:76px;
      text-align:right;
      font-weight:normal;
      color: #333;
    }
    input{
      position:relative;
      float:left;
      -webkit-appearance: none;
      width:320px;
      height:76px;
      padding:16px 20px;
      font-size:26px;
      border:2px solid #EDEDED;
      border-radius:6px;
    }
    .info{
      display:inline-block;
      font-size:22px;
      color: #999999;
      padding:10px 0 0 150px;
    }
    &.friend-uid-box{
      position:relative;
      input{
        padding-right:100px;
      }
      .btn-verify{
        position:absolute;
        top:0;
        right:10px;
        width:100px;
        height:76px;
        font-size:26px;
        line-height:64px;
        text-align:center;
        color:#fff;
        background: #F30C23;
        border-radius: 2px;
      }
    }
    &.friend-info-box{
      .friend-info{
        display:flex;
        align-items:center;
        line-height:76px;
        .avatar{
          overflow:hidden;
          width:64px;
          height:64px;
          margin-right:10px;
          border-radius:50%;
          background:#ECECEC;
          img{
            display:block;
            width:100%;
          }
        }
        .nickname{
          flex:1;
          font-size:28px;
          font-weight:bold;
          // @include showEllipsis;
        }
      }
    }
    &.amount-box{
      position:relative;
      input{
        padding-left:40px;
      }
      .mark{
        position:absolute;
        top:0;
        left:166px;
        line-height:64px;
      }
    }
  }
  .zhuan-box{
    input{
      width:100% !important;
    }
  }
  .btn-box{
    display:flex;
    border-top:2px solid #ededed;
    .btn{
      width:50%;
      font-size:28px;
      line-height:94px;
      text-align:center;
      color:#333;
      &.confirm-btn{
        border-left:2px solid #ededed;
        color:#f20b22;
      }
    }
  }
  .donation-success-box{
    .img-box{
      width:104px;
      height:104px;
      margin:20px auto;
      img{
        display:block;
        width:100%;
      }
    }
    .txt{
      margin:20px 0 40px;
      font-size:36px;
      line-height: 50px;
      text-align:center;
    }
    .btn-box{
      .close-btn{
        width:100%;
      }
    }
  }
}
</style>
